/*
Theme Name: 노트북 AI 업무실
Theme URI: https://example.com/
Author: 노트북 AI 업무실
Description: 혼자 일하며 겪은 AI·Telegram·문서 자동화 시행착오를 기록하는 개인 블로그 테마
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: laptop-ai-lab
*/

:root {
  --ink: #292722;
  --body: #4e4a43;
  --muted: #77716a;
  --line: rgba(58, 52, 45, .14);
  --paper: #fbfaf7;
  --paper-deep: #f1ede5;
  --surface: #fffefb;
  --soft: #f6f3ed;
  --green: #5e806c;
  --green-deep: #365c48;
  --green-soft: #e6eee8;
  --rust: #9b5c43;
  --yellow: #f4e7b9;
  --radius: 10px;
  --shadow: 0 12px 36px rgba(58, 48, 36, .07);
  --content: 1120px;
  --serif: "Batang", "Times New Roman", serif;
  --sans: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.82;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-deep); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site-shell { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,250,247,.95); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; letter-spacing: -.035em; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--green-deep); color: #fff; border-radius: 50%;
  font-family: Georgia, serif; font-size: 16px; font-style: italic;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.22; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: .02em; }
.primary-menu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { font-size: 13px; font-weight: 600; color: #4c4841; }
.header-cta, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 17px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer;
}
.header-cta:hover, .button:hover { border-color: var(--green); color: var(--green-deep); }
.button.secondary { background: transparent; }
.menu-toggle { display: none; width: 42px; height: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }

.hero { padding: 88px 0 74px; background: var(--paper); border-bottom: 1px solid var(--line); }
.journal-hero { position: relative; }
.journal-hero::before { content: ""; position: absolute; left: 4%; top: 52px; width: 44px; height: 2px; background: var(--rust); transform: rotate(-7deg); }
.journal-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 76px; align-items: center; }
.journal-intro { max-width: 700px; }
.hand-label { margin: 0 0 18px; color: var(--rust); font-family: var(--serif); font-size: 14px; font-style: italic; letter-spacing: .03em; }
.hero h1 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(40px, 5.3vw, 63px); font-weight: 700; line-height: 1.22; letter-spacing: -.055em; }
.hero p { max-width: 660px; margin: 26px 0 0; color: #5f5a52; font-size: 17px; line-height: 1.9; }
.journal-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 31px; }
.journal-links a, .read-note { color: var(--green-deep); font-size: 13px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.journal-links a::after, .read-note::after { content: " →"; }
.hero-proof { display: flex; gap: 12px; }
.desk-note {
  position: relative; padding: 40px 34px 30px; background: #fffdf5; border: 1px solid rgba(94,77,52,.16);
  box-shadow: 0 18px 40px rgba(66,53,36,.09); transform: rotate(.7deg);
}
.tape { position: absolute; left: 50%; top: -13px; width: 88px; height: 27px; background: rgba(228,212,164,.72); transform: translateX(-50%) rotate(-2deg); }
.note-date { margin: 0 0 8px !important; color: var(--muted) !important; font-family: ui-monospace, Consolas, monospace; font-size: 11px !important; }
.desk-note h2 { margin: 0 0 18px; color: var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1.45; }
.desk-note ul { margin: 0; padding: 0; list-style: none; }
.desk-note li { padding: 11px 0 11px 19px; border-bottom: 1px dashed rgba(58,52,45,.16); font-size: 13px; line-height: 1.7; }
.desk-note li::before { content: "·"; float: left; margin-left: -17px; color: var(--rust); font-weight: 900; }
.note-sign { margin-top: 20px !important; color: var(--rust) !important; font-family: var(--serif); font-size: 12px !important; font-style: italic; text-align: right; }

.journal-search { display: grid; grid-template-columns: auto minmax(360px, 630px); align-items: center; justify-content: space-between; gap: 30px; padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.journal-search > p { margin: 0; color: var(--muted); font-size: 13px; }
.search-card { padding: 0; background: transparent; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; min-width: 0; }
.search-field { width: 100%; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); outline: 0; border-radius: 6px; background: var(--surface); color: var(--ink); }
.search-field:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(94,128,108,.13); }
.search-submit { min-width: 90px; border: 0; border-radius: 6px; background: var(--green-deep); color: #fff; font-weight: 700; cursor: pointer; }

.section { padding: 78px 0; }
.section.soft, .latest-journal { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-kicker { margin: 0 0 7px; color: var(--rust); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.section-title { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); line-height: 1.35; letter-spacing: -.045em; }
.section-desc { max-width: 570px; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.text-link { color: var(--green-deep); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 5px; }
.text-link::after { content: " →"; }

.journal-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 68px; align-items: start; }
.journal-post-list { border-top: 2px solid var(--ink); }
.journal-post { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 20px; padding: 27px 4px; border-bottom: 1px solid var(--line); }
.journal-post.is-featured { margin: 0 -18px; padding: 32px 22px; background: var(--paper-deep); }
.post-date-block { padding-top: 4px; font-family: ui-monospace, Consolas, monospace; text-align: center; }
.post-date-block time { display: block; color: var(--ink); font-size: 16px; font-weight: 800; }
.post-date-block span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.post-category { margin: 0 0 6px !important; color: var(--rust) !important; font-size: 11px !important; font-weight: 700; }
.journal-post h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 23px; line-height: 1.48; letter-spacing: -.025em; }
.journal-post h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.journal-post-copy > p:not(.post-category) { margin: 9px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.workbench { position: sticky; top: 98px; display: grid; gap: 24px; }
.workbench-card { padding: 27px; border: 1px solid var(--line); background: var(--paper); }
.workbench-card h2 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 21px; line-height: 1.55; }
.workbench-card > p:not(.section-kicker) { margin: 14px 0; color: var(--muted); font-size: 13px; }
.about-note { border-top: 3px solid var(--green); }
.fail-note { background: #fffaf1; border-top: 3px solid var(--rust); transform: rotate(-.35deg); }
.fail-note ul { margin: 0; padding: 0; list-style: none; }
.fail-note li { padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 12px; line-height: 1.75; }
.fail-note li:last-child { border-bottom: 0; }
.fail-note strong { color: var(--ink); }

.topic-notebook { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.category-lines { border-top: 2px solid var(--ink); }
.category-line { display: grid; grid-template-columns: 62px minmax(0, 1fr) 30px; align-items: center; gap: 20px; padding: 24px 8px; border-bottom: 1px solid var(--line); }
.category-line:hover { background: rgba(255,255,255,.48); color: inherit; }
.category-number { color: var(--rust); font-family: Georgia, serif; font-style: italic; }
.category-line strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 21px; }
.category-line small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.category-arrow { color: var(--green-deep); font-size: 18px; }

.closing-note { background: var(--surface); }
.closing-note-inner { max-width: 760px; text-align: center; }
.closing-note h2 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(27px, 4vw, 39px); line-height: 1.45; }
.closing-note p:not(.hand-label) { margin: 18px auto 22px; color: var(--muted); font-size: 14px; }

.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 58px; padding: 62px 0 92px; }
.main-content { min-width: 0; }
.page-header { padding: 70px 0 46px; background: var(--paper-deep); border-bottom: 1px solid var(--line); }
.page-header h1 { max-width: 850px; margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(34px, 5vw, 54px); line-height: 1.3; letter-spacing: -.05em; }
.page-header p { max-width: 720px; color: var(--muted); font-size: 16px; }
.article-header .article-dates { margin-bottom: 0; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.article { max-width: 760px; color: #45413b; }
.article .entry-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 34px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.article h2 { margin: 50px 0 16px; color: var(--ink); font-family: var(--serif); font-size: 29px; line-height: 1.45; letter-spacing: -.035em; }
.article h3 { margin: 34px 0 11px; color: var(--ink); font-family: var(--serif); font-size: 21px; }
.article p { margin: 0 0 21px; }
.article ul, .article ol { padding-left: 25px; }
.article li { margin: 8px 0; }
.article code { padding: 2px 6px; border-radius: 4px; background: var(--green-soft); color: var(--green-deep); font-family: ui-monospace, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
.article pre { overflow-x: auto; padding: 22px; border: 1px solid #3d403b; border-radius: 6px; background: #292b28; color: #e7ede8; }
.article blockquote { margin: 30px 0; padding: 20px 23px; border-left: 3px solid var(--rust); background: #fff9ed; color: #514b42; }
.article a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article-footer { margin-top: 52px; padding-top: 24px; border-top: 2px solid var(--ink); }
.sidebar { position: sticky; top: 98px; align-self: start; }
.sidebar-card { margin-bottom: 20px; padding: 23px; border: 1px solid var(--line); background: var(--surface); }
.sidebar-card h3 { margin: 0 0 12px; color: var(--ink); font-family: var(--serif); font-size: 18px; }
.sidebar-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.sidebar-card ul { margin: 0; padding: 0; list-style: none; }
.sidebar-card li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sidebar-card li:last-child { border-bottom: 0; }
.profile-note { border-top: 3px solid var(--green); }
.margin-note { background: #fffaf1; transform: rotate(.3deg); }
.margin-note a { color: var(--green-deep); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.category-card, .post-card, .process-card, .archive-item { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.category-icon { color: var(--rust); font-family: ui-monospace, monospace; font-size: 12px; font-weight: 800; }
.category-card h3, .post-card h3 { color: var(--ink); font-family: var(--serif); }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.post-thumb { display: block; padding: 16px; background: var(--paper-deep); }
.post-thumb code { word-break: break-all; }
.post-card-body { padding-top: 18px; }
.post-meta { color: var(--muted); font-size: 11px; }
.archive-grid { display: grid; gap: 16px; }
.archive-item h2 { margin: 8px 0; color: var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1.45; }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 13px; border: 1px solid var(--line); border-radius: 5px; }
.page-numbers.current { background: var(--green-deep); color: #fff; }

.site-footer { border-top: 1px solid var(--line); background: #eeebe4; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; padding: 55px 0 34px; }
.footer-title { margin: 0 0 12px; color: var(--ink); font-family: var(--serif); font-size: 20px; }
.footer-copy { max-width: 420px; color: var(--muted); font-size: 13px; }
.footer-nav { margin: 0; padding: 0; list-style: none; }
.footer-nav li { margin: 8px 0; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 21px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@media (max-width: 960px) {
  .journal-hero-grid, .journal-layout { grid-template-columns: 1fr; }
  .journal-hero-grid { gap: 50px; }
  .desk-note { max-width: 580px; }
  .workbench { position: static; grid-template-columns: repeat(2, 1fr); }
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .sidebar-card { margin: 0; }
}

@media (max-width: 760px) {
  .site-shell { width: min(calc(100% - 28px), var(--content)); }
  .header-inner { min-width: 0; min-height: 64px; gap: 10px; }
  .brand, .brand-copy { min-width: 0; }
  .brand-copy small { display: none; }
  .menu-toggle { display: grid; place-items: center; position: relative; z-index: 2; flex: 0 0 42px; color: var(--ink); font-size: 20px; cursor: pointer; }
  .header-cta { display: none; }
  .primary-nav { display: none; position: absolute; left: 14px; right: 14px; top: 64px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
  .primary-nav.open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 4px; }
  .primary-menu a { display: block; padding: 11px; border-radius: 5px; }
  .hero { padding: 62px 0 54px; }
  .hero-content { width: min(calc(100% - 28px), var(--content)); max-width: calc(100% - 28px); }
  .hero h1 { font-size: 32px; line-height: 1.28; letter-spacing: -.045em; word-break: normal; overflow-wrap: anywhere; }
  .hero h1 br { display: none; }
  .hero p { max-width: 100%; padding: 0 2px; font-size: 15px; word-break: normal; overflow-wrap: anywhere; }
  .hero-proof { display: grid; grid-template-columns: 1fr; gap: 8px; text-align: left; }
  .journal-hero-grid { gap: 42px; }
  .desk-note { padding: 35px 25px 25px; transform: none; }
  .journal-links { flex-direction: column; gap: 12px; }
  .journal-search { grid-template-columns: 1fr; gap: 13px; }
  .search-card { width: 100%; max-width: 100%; }
  .search-form { flex-direction: column; }
  .search-submit { width: 100%; min-width: 0; height: 44px; }
  .section { padding: 58px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .journal-post { grid-template-columns: 54px minmax(0, 1fr); gap: 13px; padding: 24px 0; }
  .journal-post.is-featured { margin: 0 -8px; padding: 26px 10px; }
  .journal-post h3 { font-size: 20px; }
  .workbench { grid-template-columns: 1fr; }
  .fail-note, .margin-note { transform: none; }
  .category-line { grid-template-columns: 42px minmax(0, 1fr) 22px; gap: 10px; padding: 20px 0; }
  .category-line strong { font-size: 18px; }
  .category-grid, .post-grid, .footer-grid, .sidebar { grid-template-columns: 1fr; }
  .footer-grid { gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .page-header { padding: 50px 0 32px; }
  .content-wrap { padding-top: 40px; }
  .article .entry-meta { flex-direction: column; gap: 4px; }
}
