:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f7f6;
  --bg-card: #ffffff;
  --card-bg: #ffffff;
  --bg-hover: #f3f2f1;
  --text-primary: #1c1917;
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  --bg: #ffffff;
  --accent: #1e3a5f;
  --accent-hover: #15294a;
  --accent-soft: #eef2f7;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #1e3a5f;
  --sidebar-width: 260px;
  --max-width: 960px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #1c1917;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: #f8f7f6;
  border-right: 1px solid #e7e5e4;
  padding: 32px 20px;
  z-index: 30;
}

.profile-section {
  text-align: center;
  margin-bottom: 28px;
}

.profile-avatar {
  width: 138px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  border: 3px solid #d6d3d1;
  margin-bottom: 14px;
  background: #fff;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 4px;
}

.profile-title {
  font-size: 13px;
  color: #78716c;
  line-height: 1.5;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.lab-logo-link {
  display: block;
  width: min(188px, 100%);
  margin: 12px auto 4px;
}

.lab-logo-link:hover {
  opacity: 0.92;
}

.lab-logo-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d6d3d1;
  background: transparent;
  color: #57534e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-section {
  margin-bottom: 20px;
}

.nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a8a29e;
  margin-bottom: 8px;
  font-weight: 600;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link {
  display: block;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 4px;
  color: #44403c;
}

.nav-link:hover {
  background: #f0efed;
  color: #1c1917;
}

.nav-link.active {
  background: #e7e5e4;
  color: #1c1917;
  font-weight: 600;
}

.language-toggle {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #e7e5e4;
}

.lang-btn {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #d6d3d1;
  color: #57534e;
  background: transparent;
  font-size: 13px;
  margin-right: 4px;
}

.lang-btn.active {
  background: #1c1917;
  color: #fff;
  border-color: #1c1917;
  font-weight: 600;
}

.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding: 40px 36px 80px;
}

.page-header,
.posts-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

.hero-banner {
  padding: 24px 28px;
  border-radius: 6px;
  background: #f8f7f6;
  border: 1px solid #e7e5e4;
  border-left: 4px solid var(--accent);
}

.hero-lab-logo-link {
  display: inline-block;
  margin-bottom: 12px;
}

.hero-lab-logo-link:hover {
  opacity: 0.92;
}

.hero-lab-logo-image {
  display: block;
  width: clamp(180px, 32vw, 320px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-banner h2 {
  font-size: 24px;
  line-height: 1.35;
  margin-bottom: 10px;
  color: #1c1917;
}

.hero-banner p {
  color: #44403c;
}

.hero-banner .meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #57534e;
}

.hero-traffic {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.traffic-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #44403c;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 999px;
  padding: 4px 10px;
}

.traffic-item strong {
  color: #1c1917;
}

.traffic-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  padding: 4px 2px;
}

.traffic-link:hover {
  color: var(--accent-hover);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e7e5e4;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 13px;
  color: #a8a29e;
}

.posts-section {
  margin-bottom: 40px;
}

.posts-list {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: 1 / -1;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  padding: 18px 20px;
}

.post-card:hover {
  border-color: #d6d3d1;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.post-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: #eef2f7;
  padding: 2px 8px;
  border-radius: 3px;
}

.post-date {
  font-size: 13px;
  color: #a8a29e;
}

.post-title {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #1c1917;
  font-weight: 600;
}

.post-excerpt {
  color: #57534e;
  font-size: 14px;
  line-height: 1.65;
}

.kv-list {
  display: grid;
  gap: 8px;
}

.kv-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e7e5e4;
}

.kv-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kv-term {
  font-size: 13px;
  color: #78716c;
  font-weight: 600;
}

.kv-desc {
  font-size: 14px;
  color: #44403c;
}

.bullet-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.bullet-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  color: #44403c;
}

.bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #1e3a5f;
}

.timeline-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0efed;
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-date {
  font-size: 13px;
  color: #78716c;
  font-weight: 600;
}

.timeline-body {
  font-size: 14px;
  color: #44403c;
}

.schedule-table-wrap {
  overflow-x: auto;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
}

.schedule-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.schedule-table th,
.schedule-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e7e5e4;
  font-size: 14px;
  color: #44403c;
  vertical-align: middle;
  text-align: center;
}

.schedule-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #57534e;
  background: #fafaf9;
  font-weight: 600;
}

.schedule-table th:not(:last-child),
.schedule-table td:not(:last-child) {
  border-right: 1px solid #f0efed;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table td.period {
  width: 56px;
  text-align: center;
  font-weight: 600;
  color: #1c1917;
}

.schedule-table td.time {
  width: 104px;
  white-space: nowrap;
  color: #57534e;
}

.schedule-table td.slot {
  color: var(--accent);
  font-weight: 600;
}

.feature-media {
  margin-top: 14px;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  overflow: hidden;
}

.feature-media img {
  width: 100%;
  display: block;
}

.screenshot-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screenshot-item {
  display: block;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.screenshot-item:hover {
  border-color: #a8a29e;
}

.screenshot-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 12px;
  color: #57534e;
  background: #f5f5f4;
  border-radius: 3px;
  padding: 2px 8px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  border: 1px solid #d6d3d1;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #44403c;
  background: #fff;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn:hover {
  border-color: #a8a29e;
  color: #1c1917;
}

.btn.primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: var(--max-width);
  margin: 0 auto 16px;
  overflow-x: auto;
  padding: 0 0 4px;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e7e5e4;
  border-radius: 4px;
  padding: 6px 12px;
  color: #57534e;
  background: #fff;
  white-space: nowrap;
  font-size: 13px;
}

.category-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: #eef2f7;
  font-weight: 600;
}

.category-count {
  font-size: 12px;
  color: #a8a29e;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d6d3d1;
  color: #44403c;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  font-size: 13px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  color: #1c1917;
}

.mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 35;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #44403c;
}

@media (max-width: 1140px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 60px 16px 60px;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .page-title {
    font-size: 26px;
  }

  .hero-banner h2 {
    font-size: 20px;
  }

  .section-title {
    font-size: 20px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-title {
    font-size: 16px;
  }

  .back-to-top span {
    display: none;
  }
}

@media (max-width: 620px) {
  .kv-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}
