/* ========================================
   정간보 스타일
   - 한국 전통 악보에서 영감받은 디자인
======================================== */

/* Google Fonts - Spectral (제목) + Source Sans 3 (본문) */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Source+Sans+3:wght@400;500;600&display=swap');

/* 배경 - 한지 느낌 CSS 기본 배경 (p5.js 없이도 항상 표시) */
.notebook-body {
  background: linear-gradient(
    180deg,
    rgb(248, 244, 238) 0%,
    rgb(244, 240, 232) 40%,
    rgb(240, 236, 228) 100%
  );
  min-height: 100vh;
}

/* 노트북 스타일에서 기존 남색 사이드바 숨김 */
.notebook-body::before {
  display: none;
}

/* 전체 컨테이너 */
.notebook {
  position: relative;
  max-width: 1100px;
  min-height: calc(100vh - 80px);
  margin: 40px auto;
  display: flex;
  gap: 40px;
  padding: 0 20px;
}

/* 정간보 페이지 영역 */
.notebook-page {
  flex: 1;
  background-color: rgba(253, 252, 250, 0.92);
  padding: 50px 60px 50px 60px;
  border-radius: 2px;
  border: 2px solid rgba(60, 50, 40, 0.2);
  box-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.06),
    0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  min-height: calc(100vh - 160px);
}

/* 정간보 테두리 느낌 - 이중 테두리 */
.notebook-page::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid rgba(60, 50, 40, 0.15);
  pointer-events: none;
}

/* 왼쪽 사이드바 컨테이너 */
.sidebar-nav {
  width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 0 40px;
  flex-shrink: 0;
  min-height: calc(100vh - 160px);
}

/* 네비게이션 탭 */
.notebook-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 헤더 키워드 - 이름 아래 */
.header-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  margin-bottom: 1.2em;
}

.header-keywords span {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(60, 50, 40, 0.5);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* 개별 탭 */
.notebook-tab {
  padding: 12px 16px;
  background: transparent;
  border-radius: 0;
  display: block;
  font-family: "Source Sans 3", "MaruBuri", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(60, 50, 40, 0.45);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  border-left: 2px solid transparent;
  letter-spacing: 0.02em;
}

.notebook-tab:hover {
  color: rgba(60, 50, 40, 0.75);
  border-left-color: rgba(80, 60, 40, 0.25);
  padding-left: 20px;
}

.notebook-tab.active {
  color: #3c3228;
  font-weight: 600;
  border-left: 2px solid #3c3228;
  padding-left: 20px;
}

/* 본문 타이포그래피 */
.notebook-page {
  font-family: "Source Sans 3", "MaruBuri", sans-serif;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #3c3228;
}

.notebook-page h1 {
  font-family: "Spectral", "MaruBuri", serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #2a2520;
  letter-spacing: 0.01em;
  margin-bottom: 0.2em;
  line-height: 1.3;
}

.notebook-page h2 {
  font-family: "Spectral", "MaruBuri", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2a2520;
  letter-spacing: 0.01em;
  margin-bottom: 1em;
  margin-top: 2.5em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid rgba(60, 50, 40, 0.15);
}

.notebook-page h2:first-of-type {
  margin-top: 0;
}

/* 섹션 간 구분 */
.notebook-page section {
  margin-bottom: 3.5em;
}

.notebook-page section:last-child {
  margin-bottom: 0;
}

.notebook-page h3 {
  font-family: "Source Sans 3", "MaruBuri", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a3f35;
  margin: 1.2em 0 0.6em;
}

.notebook-page p {
  margin-bottom: 0.8em;
  color: #4a4035;
  font-size: 0.8rem;
  line-height: 1.65;
}

/* Home 페이지 소개 텍스트 */
.notebook-page .intro-text {
  font-size: 0.78rem;
  line-height: 1.6;
  margin-bottom: 0.5em;
}

/* 사진 아래 소셜 아이콘 */
.cover-media .social-icons {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cover-media .social-icons .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(80, 60, 40, 0.08);
  color: #5a4a3a;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.cover-media .social-icons .icon:hover {
  background: rgba(80, 60, 40, 0.12);
  color: #3c3228;
  transform: translateY(-2px);
}

.notebook-page a {
  color: #5a4a3a;
  text-decoration: underline;
  text-decoration-color: rgba(80, 60, 40, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.notebook-page a:hover {
  color: #3c3228;
  text-decoration-color: rgba(80, 60, 40, 0.6);
}

.notebook-page ul {
  padding-left: 1.2em;
}

.notebook-page li {
  margin-bottom: 0.6em;
  line-height: 1.6;
  font-size: 0.8rem;
}

.notebook-page strong {
  font-weight: 600;
  color: #3c3228;
}

/* Publications 섹션 */
.research-topic h3 {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(60, 50, 40, 0.1);
  margin: 0;
  font-family: "Source Sans 3", "MaruBuri", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(60, 50, 40, 0.55);
  letter-spacing: 0.02em;
}

.research-topic ul {
  padding: 10px 0 15px 0;
  margin: 0;
}

/* 페이지 전환 애니메이션 */
.notebook-page {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   반응형 - 태블릿
======================================== */
@media (max-width: 1100px) {
  .notebook {
    gap: 25px;
  }

  .sidebar-nav {
    width: 120px;
  }

  .notebook-tab {
    padding: 12px 14px;
    font-size: 0.8rem;
  }

  .notebook-page {
    padding: 40px 40px 40px 50px;
  }
}

/* ========================================
   반응형 - 모바일
======================================== */
@media (max-width: 768px) {
  .notebook-body {
    background: transparent;
  }

  .notebook {
    margin: 0;
    min-height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .sidebar-nav {
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .notebook-page {
    padding: 30px 20px 100px;
    border-radius: 0;
    border: none;
    min-height: calc(100vh - 60px);
    background-image: none;
  }

  .notebook-page::before {
    display: none;
  }

  .notebook-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    background: #3c3228;
    padding: 12px 0;
    gap: 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  }

  .notebook-tab {
    padding: 8px 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-left: none;
    font-size: 0.7rem;
    text-align: center;
  }

  .notebook-tab:hover {
    color: #fff;
    padding-left: 10px;
    border-left: none;
  }

  .notebook-tab.active {
    color: #fff;
    font-weight: 600;
    border-left: none;
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
  }
}
