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

/* Page layout */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  color: #111;
  background: #fff;
  padding: 24px;
}

/* Image that scales responsively and preserves aspect ratio.
   Use object-fit: cover to fill the box (may crop), or contain to show full image. */
.img-fit {
  display: block;
  width: 120%;
  height: 120%;
  object-fit: cover;      /* change to 'contain' to avoid cropping */
  object-position: center;
}

/* Header */
.page-header {
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile {
  flex: 0 0 auto;
  width: 300px;
  height: 300px;
}

.profile-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f4f4f4;
}

/* Title */
.title-block {
  flex: 1 1 auto;
}

.page-title {
  font-size: 28px;
  margin-bottom: 6px;
}

.subtitle {
  color: #555;
  font-size: 14px;
}

/* Category bar (clickable categories) */
.category-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category {
  text-decoration: none;
  background: #f6f7f9;
  color: #0b66c2;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid transparent;
}

.category:hover,
.category:focus {
  background: #e9f1ff;
  border-color: #cfe6ff;
}

/* Main content + TOC layout */
.content {
  max-width: 760px;
  margin-top: 18px;
  margin-right: 280px; /* leave room for TOC */
}

.toc {
  position: fixed;
  right: 24px;
  top: 160px;
  width: 240px;
  border-left: 1px solid #eee;
  padding-left: 12px;
  color: #333;
  font-size: 14px;
}

.toc h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.toc ul {
  list-style: none;
}

.toc a {
  color: #0b66c2;
  text-decoration: none;
}

.toc a:hover { text-decoration: underline; }

/* Sections */
.section {
  margin-bottom: 24px;
}

.section h2 {
  font-size: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* Footer */
.page-footer {
  margin-top: 36px;
  color: #666;
  font-size: 13px;
}

/* Responsive: collapse TOC under content on narrow screens */
@media (max-width: 900px) {
  .content { margin-right: 0; }
  .toc {
    position: static;
    width: 100%;
    border-left: none;
    padding-left: 0;
    margin-top: 18px;
  }
  .header-inner {
    flex-direction: row;
  }
  .profile-img { width: 80px; height: 80px; }
}
