/* ============================================================
   리이오의 연습장, 모던 블랙 앤 화이트
   리이오가 배우고 기록하는 곳
   고대비 · 큰 타이포 · 절제된 그리드
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #FFFFFF;        /* 배경 */
  --paper-warm: #F6F6F6;   /* 은은한 면 */
  --paper-deep: #E4E4E4;   /* 경계선 */
  --card: #FFFFFF;         /* 카드 표면 */
  --card-hover: #FAFAFA;
  --ink: #0A0A0A;          /* 거의 검정 */
  --ink-soft: #2E2E2E;     /* 본문 */
  --ink-faint: #6E6E6E;    /* 보조 */
  --ink-mute: #9A9A9A;     /* 가장 흐림 */
  --rule: #EAEAEA;         /* 얇은 구분선 */
  --rule-faint: rgba(0, 0, 0, 0.05);
  --accent: #0A0A0A;       /* 강조 = 블랙 */
  --accent-soft: #6E6E6E;
  --accent-tint: rgba(0, 0, 0, 0.05);
  --sage: #0A0A0A;
  --rose: #6E6E6E;
  --indigo: #9A9A9A;
  --highlight: #0A0A0A;    /* 마커 = 블랙 반전 */
  --sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 옵션: 아주 얇은 라인 배경 (거의 안 쓰임) */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom, transparent, transparent 31px,
    var(--rule-faint) 31px, var(--rule-faint) 32px);
}

/* ============================================================
   타이포그래피
   ============================================================ */

.handwritten { font-family: var(--sans); font-weight: 500; }
.serif { font-family: var(--sans); }
.mono { font-family: var(--mono); }

h1, h2, h3, h4, h5 {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--paper-deep);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
a:hover { border-bottom-color: var(--ink); }

em { font-style: normal; font-weight: 700; color: var(--ink); }

/* 마커 = 블랙 반전 강조 */
.highlight {
  background: var(--highlight);
  color: #fff;
  padding: 0.02em 0.22em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 취소선 */
.strike {
  position: relative;
  display: inline-block;
  color: var(--ink-mute);
}
.strike::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  top: 52%;
  height: 3px;
  background: var(--ink);
  transform: rotate(-3deg);
}

/* ============================================================
   레이아웃
   ============================================================ */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.75rem;
  position: relative;
  z-index: 1;
}
.container--wide { max-width: 1080px; }

main { position: relative; z-index: 1; padding-bottom: 1.5rem; }

/* ============================================================
   상단 네비게이션
   ============================================================ */

.topbar {
  padding: 1.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.brand {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  border-bottom: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}
.brand:hover { color: var(--ink); border-bottom: none; }
.brand-mark {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  font-weight: 400;
}

.topnav {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
}
.topnav a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: none;
  padding-bottom: 2px;
}
.topnav a:hover { color: var(--ink); }
.topnav a.active {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* 좁아지면 브랜드 부제부터 접고, 그다음 자간을 줄여 한 줄을 지킨다 */
@media (max-width: 900px) {
  .brand-mark { display: none; }
  .topnav { gap: 0.85rem; }
  .topnav a { font-size: 0.64rem; letter-spacing: 0.1em; }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  section { padding: 2.6rem 0; }
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 0.9rem; flex-wrap: wrap; }
  .topnav { flex-wrap: wrap; margin-left: 0; gap: 0.9rem; }
  .topnav a { font-size: 0.66rem; }
}

/* ============================================================
   페이지 헤더
   ============================================================ */

.page-head {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.page-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
  display: inline-block;
}

.page-title {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.02;
}

.page-sub {
  font-size: 1.1rem;
  color: var(--ink-faint);
  max-width: 560px;
  line-height: 1.7;
}

.page-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  margin-top: 1.4rem;
}

/* ============================================================
   섹션
   ============================================================ */

section { padding: 3.25rem 0; }

.section-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
  display: inline-block;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.15;
}

.section-desc {
  color: var(--ink-faint);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.section-divider {
  border: none;
  text-align: center;
  margin: 3.5rem 0;
  height: 1px;
  background: var(--rule);
}
.section-divider::before { content: ''; }

/* ============================================================
   카드 / 노트 블록
   ============================================================ */

.note {
  background: var(--card);
  border: 1px solid var(--paper-deep);
  border-radius: 6px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1rem;
  position: relative;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.note:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

a.note { display: block; color: inherit; border-bottom: none; }
a.note:hover { border-bottom: none; }

.note-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.note-desc {
  font-size: 0.92rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.note-meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  margin-top: 0.8rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 접힌 모서리 카드 → 평평한 모던 카드 */
.foldnote {
  background: var(--card);
  border: 1px solid var(--paper-deep);
  border-radius: 6px;
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}
.foldnote::before { display: none; }

/* ============================================================
   목록
   ============================================================ */

.list-plain { list-style: none; padding: 0; }
.list-plain li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
  line-height: 1.6;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.list-plain li:last-child { border-bottom: none; }
.list-plain li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  transform: translateY(-2px);
}
.list-plain a { color: var(--ink-soft); border-bottom: none; }
.list-plain a:hover { color: var(--ink); border-bottom: 1px solid var(--ink); }

.list-dated { list-style: none; padding: 0; }
.list-dated li {
  padding: 0.7rem 0;
  display: flex;
  gap: 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.list-dated li:last-child { border-bottom: none; }
.list-dated .date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  flex-shrink: 0;
  width: 88px;
  padding-top: 0.25rem;
  letter-spacing: 0.02em;
}
.list-dated .item-title {
  flex: 1;
  color: var(--ink-soft);
  border-bottom: none;
  font-size: 0.98rem;
  font-weight: 500;
}
.list-dated .item-title:hover { color: var(--ink); }

/* ============================================================
   책꽂이 헤더
   ============================================================ */

.shelf { margin-bottom: 2.2rem; }
.shelf-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}
.shelf-icon { font-size: 1.05rem; }
.shelf-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.shelf-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-mute);
  margin-left: auto;
}

/* ============================================================
   인용
   ============================================================ */

.quote {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: normal;
  color: var(--ink);
  border-left: 3px solid var(--ink);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin: 2.2rem 0;
  line-height: 1.5;
  letter-spacing: -0.02em;
}
.quote-cite {
  display: block;
  margin-top: 0.7rem;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-faint);
  letter-spacing: 0;
}

/* ============================================================
   콜아웃
   ============================================================ */

.callout {
  background: var(--paper-warm);
  border: 1px solid var(--paper-deep);
  border-left: 3px solid var(--ink);
  border-radius: 0 6px 6px 0;
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.callout--warm, .callout--rose, .callout--ink { border-left-color: var(--ink); }

.callout-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

/* ============================================================
   태그 / 배지
   ============================================================ */

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  margin-right: 0.3rem;
  vertical-align: middle;
}
.tag--sage, .tag--rose, .tag--ink {
  background: #fff; color: var(--ink); border-color: var(--ink);
}
.tag--free {
  background: transparent; color: var(--ink-faint);
  border: 1px dashed var(--ink-mute);
}

/* ============================================================
   링크 행
   ============================================================ */

.linkrow {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.linkrow:last-child { border-bottom: none; }
.linkrow a {
  color: var(--ink-soft);
  flex: 1;
  border-bottom: none;
  font-size: 0.97rem;
  font-weight: 500;
}
.linkrow a:hover { color: var(--ink); }
.linkrow .meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-mute);
  flex-shrink: 0;
}

/* ============================================================
   랜딩 인덱스 카드
   ============================================================ */

.index-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--paper-deep);
  border-radius: 8px;
  padding: 1.7rem 1.8rem;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.index-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}
.index-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
  display: block;
  filter: grayscale(1);
}
.index-card-title {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.index-card-desc {
  font-size: 0.9rem;
  color: var(--ink-faint);
  line-height: 1.55;
}
.index-card-arrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-top: 0.9rem;
  border-bottom: 1px solid transparent;
  display: inline-block;
}
.index-card:hover .index-card-arrow { border-bottom-color: var(--ink); }

/* ============================================================
   푸터
   ============================================================ */

footer {
  margin-top: 6.5rem;
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--ink);
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-quote {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--ink);
  max-width: 32ch;
  margin: 0 auto 2.6rem;
}

/* 푸터 안내 링크 */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--rule);
}
.footer-nav a {
  font-size: 0.88rem;
  color: var(--ink-faint);
  border-bottom-color: transparent;
}
.footer-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* 연락처 */
.footer-contact { margin-top: 2.8rem; }
/* 눈썹 라벨이 아니라 말을 거는 자리다. 읽고 지나가지 말고 답장하시라고. */
.footer-invite {
  font-family: var(--sans);
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.footer-invite-sub {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}
.footer-mail {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding-bottom: 3px;
}
.footer-mail:hover { border-bottom-color: var(--ink); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.2rem;
  margin-top: 1.2rem;
  font-size: 0.82rem;
}
.footer-links a { color: var(--ink-faint); border-bottom-color: transparent; }
.footer-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.footer-copy {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}
.footer-copy a { color: var(--ink-mute); border-bottom: none; }
.footer-copy a:hover { color: var(--ink); }

@media (max-width: 600px) {
  footer { margin-top: 4.5rem; padding: 3rem 0 3.5rem; }
  .footer-quote { font-size: 1.02rem; margin-bottom: 2rem; }
  .footer-nav { gap: 0.6rem 1.1rem; padding-top: 1.8rem; }
  .footer-contact { margin-top: 2.2rem; }
  .footer-copy { margin-top: 2.2rem; }
}

/* ============================================================
   유틸리티
   ============================================================ */

.center { text-align: center; }
.muted { color: var(--ink-faint); }
.small { font-size: 0.88rem; }
.tiny { font-size: 0.72rem; }
.mt-1 { margin-top: 0.8rem; }
.mt-2 { margin-top: 1.6rem; }
.mt-3 { margin-top: 2.4rem; }
.mb-1 { margin-bottom: 0.8rem; }
.mb-2 { margin-bottom: 1.6rem; }
.mb-3 { margin-bottom: 2.4rem; }

.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 구분선, 손그림 → 얇은 라인 */
.scribble-divider {
  margin: 3.25rem auto;
  position: relative;
}
.scribble-divider svg { display: none; }
.scribble-divider::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--rule);
}

.bookmark { display: none; }
