:root {
  --page-bg: #f6f6f7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --menu-link: #6b7280;
  --menu-link-hover: #111827;
  --menu-link-active: #111827;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
}

.container {
  max-width: 980px;
  margin: 36px auto;
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.competency-page {
  max-width: 1280px;
  margin: 24px auto;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.theme-switcher {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.theme-switcher label {
  color: var(--muted);
  font-size: 14px;
}

.theme-switcher select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--text);
}

.menu {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.menu a {
  text-decoration: none;
  color: var(--menu-link);
  padding: 6px 0;
  font-weight: 500;
  transition: color 0.18s ease;
}

.menu a:hover {
  color: var(--menu-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.menu a.active {
  color: var(--menu-link-active);
}

.home-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: start;
}

.photo-placeholder {
  width: 180px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.profile-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); margin-top: 0; }

.projects-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: grid;
  gap: 8px;
}

.projects-list li {
  list-style: none;
}

.projects-list li::marker {
  content: "";
}

.project-item {
  border-bottom: 1px solid var(--border);
  padding: 0 0 8px 0;
}

.project-item details {
  width: 100%;
}

.project-item summary {
  cursor: pointer;
  color: var(--menu-link-hover);
  text-decoration: none;
  font-size: 1.04rem;
  font-weight: 500;
}

.project-item summary:hover {
  color: var(--text);
}

.project-item details p {
  margin: 8px 0 0 18px;
}

.project-item details a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-item details a:hover {
  color: #1d4ed8;
}

.project-meta {
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.competency-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 2fr);
  gap: 24px;
  margin-top: 16px;
}

.competency-sidebar {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  align-self: start;
}

.competency-sidebar details {
  border-bottom: 1px solid var(--border);
  background: #f7f8fa;
}

.competency-sidebar details:last-child {
  border-bottom: 0;
}

.competency-sidebar summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 10px;
  background: #dcebf7;
  list-style-position: inside;
}

.competency-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.competency-sidebar li {
  margin: 0;
  border-top: 1px solid #e6eaf0;
}

.competency-sidebar .subsection-item {
  padding: 0;
}

.competency-sidebar .subsection-item details {
  border: 0;
  background: transparent;
}

.competency-sidebar .subsection-item summary {
  background: #edf2f7;
  padding: 7px 10px;
  font-weight: 500;
  font-size: 0.93rem;
}

.competency-sidebar .subsection-item ul {
  margin: 0;
}

.competency-sidebar .subsection-item li a {
  padding-left: 20px;
  font-size: 0.9rem;
}

.competency-sidebar li a {
  display: block;
  padding: 7px 10px;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.93rem;
  line-height: 1.35;
}

.competency-sidebar li a:hover {
  color: #1e3a8a;
}

.competency-sidebar li a.active-link {
  color: #0f172a;
  font-weight: 600;
  background: #e8eff8;
}

.competency-definitions {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 14px;
}

.competency-definitions h2 {
  margin: 0 0 10px 0;
  font-size: 1.6rem;
}

.competency-definitions article {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 0;
  scroll-margin-top: 14px;
}

.competency-definitions article.active {
  display: block;
}

.competency-definitions article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.competency-definitions h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
}

.competency-definitions p {
  margin: 0;
  color: #374151;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .container {
    margin: 12px;
    padding: 20px 16px;
  }

  .competency-page {
    margin: 10px;
    padding: 0;
  }

  .home-layout { grid-template-columns: 1fr; }
  .competency-layout { grid-template-columns: 1fr; }
}
