:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f5;
  --bg-hover: #f1f1ef;
  --bg-card: #fbfbfa;
  --border: #e8e8e5;
  --border-strong: #d3d3ce;
  --text-primary: #1a1a18;
  --text-secondary: #6b6b68;
  --text-muted: #9b9b98;
  --accent: #2e2e2b;
  --tag-bg: #efefec;
  --tag-text: #5a5a57;
  --sidebar-width: 240px;
  --radius: 6px;
}

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

html {
  background-color: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.sidebar-logo-icon {
  width: 26px;
  height: 26px;
  background: var(--text-primary);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: white;
  font-weight: 600;
  font-family: 'DM Serif Display', serif;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 10px 4px;
  margin-top: 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px 6px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 900px;
  padding: 60px 80px 120px;
}

.member-photo img {
  padding: 1px;
  width: 25em;
  height: 25em;
  object-fit: cover;
  border-radius: 8px;
  border: 5px solid var(--border);
  display: block;
  margin: 0 auto; 
}

.member-layout {
    padding: 10px;
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 48px;
  animation: fadeUp 0.4s ease both;
}

.page-emoji {
  font-size: 48px;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 8px;
}

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

.page-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── SECTIONS ── */
.section {
  margin-bottom: 40px;
  animation: fadeUp 0.4s ease both;
}

.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }
.section:nth-child(4) { animation-delay: 0.15s; }
.section:nth-child(5) { animation-delay: 0.2s; }

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-icon {
  font-size: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── CALLOUT BLOCK ── */
.callout {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.callout-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── TEAM GRID ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.team-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.team-card a {
  color: inherit;
  text-decoration: none;
}

.team-card a:hover .team-name {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── HW TOGGLE BLOCKS ── */
.hw-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.hw-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
  list-style: none;
  width: 100%;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.hw-toggle:hover {
  background: var(--bg-hover);
}

.hw-toggle-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.hw-toggle.open .hw-toggle-arrow {
  transform: rotate(90deg);
}

.hw-toggle-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.hw-toggle-badge {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.hw-body {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 0;
}

.hw-body.open {
  display: block;
}

/* ── LANGUAGE GRID INSIDE HW ── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
}

.lang-col {
  padding: 12px 20px;
  border-right: 1px solid var(--border);
}

.lang-col:last-child {
  border-right: none;
}

.lang-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── LINK LIST ── */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-list li a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.link-list li a:before {
  content: "↗";
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.link-list li a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── SIMPLE LINK LIST ── */
.simple-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px 12px;
}

.simple-link-list li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.simple-link-list li a:before {
  content: "↗";
  font-size: 11px;
  color: var(--text-muted);
}

.simple-link-list li a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── TBD BLOCK ── */
.tbd-block {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.tbd-block .tbd-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

/* ── STATUS BADGE ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-done {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-wip {
  background: #fff8e1;
  color: #f57f17;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── TIMESTAMP ── */
.live-timestamp {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 0 0;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 32px 24px 80px;
  }
  .lang-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lang-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}