:root {
  --bg: #ffffff;
  --ink: #15171c;
  --muted: #626b7a;
  --line: #dfe3e8;
  --soft: #f5f7fa;
  --panel: #ffffff;
  --header: rgba(255, 255, 255, 0.95);
  --primary: #0066a4;
  --primary-dark: #004c7c;
  --accent: #b72b2b;
  --radius: 8px;
}

[data-theme="dark"] {
  --bg: #101418;
  --ink: #f3f6f8;
  --muted: #b4bdc7;
  --line: #2a323b;
  --soft: #171d23;
  --panel: #151b21;
  --header: rgba(16, 20, 24, 0.95);
  --primary: #65b8ff;
  --primary-dark: #9bd1ff;
  --accent: #ff7b7b;
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  color: var(--primary-dark);
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 86px;
  padding: 10px clamp(18px, 5vw, 72px);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand img {
  width: 190px;
  height: auto;
}

.brand {
  justify-self: start;
}

nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
}

nav a {
  color: var(--ink);
  font-weight: 650;
  font-size: 17px;
}

nav a.active,
.nav-dropdown-trigger.active {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger,
.theme-toggle {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 650;
}

.nav-dropdown-trigger {
  gap: 5px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 18px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
}

.nav-dropdown-menu a:hover {
  background: var(--soft);
}

main {
  min-height: calc(100vh - 166px);
}

.hero {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 72px 20px 44px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(rgba(8, 18, 28, 0.66), rgba(8, 18, 28, 0.58)), url("images/keyboard-typing.jpg");
  background-position: center;
  background-size: cover;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 18px;
  color: #fff;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.hero p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
}

.feature,
.page,
.article,
.profile {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0 72px;
}

.feature img,
.wide-image {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.kicker,
.meta {
  color: var(--muted);
  font-weight: 650;
}

.feature h2,
.section-head h2,
.page h1,
.article h1,
.profile h1 {
  line-height: 1.15;
}

.section-head {
  width: min(1120px, calc(100% - 36px));
  margin: 16px auto 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.people-overview > h1 {
  margin-bottom: 28px;
}

.people-section {
  margin-bottom: 56px;
}

.people-section-head {
  width: 100%;
  margin: 0 0 18px;
}

.grid,
.people-grid {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.news-carousel {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 56px;
  overflow: hidden;
}

.news-carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.news-carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.news-carousel.is-scrolling .news-carousel-track {
  animation: news-scroll 34s linear infinite;
}

.news-carousel.is-static .news-carousel-track {
  width: 100%;
}

.news-carousel.is-scrolling:hover .news-carousel-track {
  animation-play-state: paused;
}

.news-carousel .news-card {
  width: 340px;
  flex: 0 0 340px;
}

@keyframes news-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 12px));
  }
}

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

.people-overview-head {
  position: sticky;
  top: 86px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -12px 0 26px;
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.people-overview-head h1 {
  margin: 0;
}

.people-jump-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.people-jump-nav a {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.people-jump-nav a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.people-section {
  scroll-margin-top: 156px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  min-width: 0;
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.person-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.person-card img {
  width: min(176px, 100%);
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 18px;
}

.person-card p {
  margin: 0 0 6px;
  color: var(--ink);
}

.email {
  overflow-wrap: anywhere;
}

.person-card h2 a {
  color: var(--ink);
}

.email-line {
  width: 100%;
  margin-top: 8px;
}

.email-line a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.email-line svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding-top: 8px;
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--soft);
}

.social-icon:hover {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.ghost {
  background: var(--panel);
  color: var(--primary);
}

.article,
.profile,
.page {
  padding: 48px 0 72px;
}

.article {
  max-width: 900px;
}

.content h2,
.content h3 {
  margin-top: 34px;
}

blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  background: var(--soft);
}

figure {
  margin: 30px 0;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 18px 0;
}

.profile {
  max-width: 820px;
  text-align: center;
}

.profile > img {
  width: min(360px, 100%);
  max-height: 460px;
  margin: 0 auto 28px;
  border-radius: var(--radius);
  object-fit: cover;
}

.profile .content {
  text-align: left;
  margin-top: 28px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.login {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.panel,
.edit-form {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--panel);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
}

textarea {
  resize: vertical;
}

.rich-editor-label {
  margin-bottom: 7px;
}

.rich-toolbar {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--panel);
}

.rich-editor {
  min-height: 320px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  background: var(--panel);
}

.w-e-bar,
.w-e-text-container {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

.w-e-bar button {
  display: inline-flex;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-weight: 400;
}

.w-e-bar button:hover {
  background: var(--soft);
}

.w-e-text-container [data-slate-editor] {
  min-height: 320px;
  color: var(--ink) !important;
}

.w-e-bar-item button {
  color: var(--ink) !important;
}

.w-e-bar svg {
  fill: var(--ink) !important;
}

.w-e-select-list,
.w-e-drop-panel,
.w-e-modal {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  z-index: 1000 !important;
}

.w-e-select-list *,
.w-e-drop-panel *,
.w-e-modal *,
.w-e-modal input,
.w-e-modal textarea {
  color: var(--ink) !important;
}

.w-e-modal input,
.w-e-modal textarea {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

[data-theme="dark"] .w-e-bar,
[data-theme="dark"] .w-e-text-container,
[data-theme="dark"] .w-e-select-list,
[data-theme="dark"] .w-e-drop-panel,
[data-theme="dark"] .w-e-modal {
  background: #151b21 !important;
  color: #f3f6f8 !important;
  border-color: #2a323b !important;
}

[data-theme="dark"] .w-e-bar *,
[data-theme="dark"] .w-e-text-container *,
[data-theme="dark"] .w-e-select-list *,
[data-theme="dark"] .w-e-drop-panel *,
[data-theme="dark"] .w-e-modal *,
[data-theme="dark"] .w-e-bar button,
[data-theme="dark"] .w-e-bar-item button {
  color: #f3f6f8 !important;
}

[data-theme="dark"] .w-e-bar svg {
  fill: #f3f6f8 !important;
}

[data-theme="dark"] .w-e-bar button:hover,
[data-theme="dark"] .w-e-select-list div:hover,
[data-theme="dark"] .w-e-drop-panel div:hover {
  background: #202832 !important;
}

.w-e-text-placeholder {
  color: var(--muted) !important;
}

.bio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--panel);
}

.bio-toolbar button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

.bio-toolbar button:hover {
  background: var(--panel);
}

.bio-editor {
  min-height: 260px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
}

.bio-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.bio-editor p {
  margin: 0 0 12px;
}

.bio-editor h2,
.bio-editor h3 {
  margin: 0 0 12px;
}

.bio-editor ul,
.bio-editor ol {
  margin: 0 0 12px 22px;
}

.bio-editor blockquote {
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
}

.editor-tools button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
}

.check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.export-email-form fieldset {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.export-email-form legend {
  padding: 0 6px;
  font-weight: 700;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}

.danger-check {
  margin: 16px 0 10px;
  color: #b42318;
  font-weight: 600;
}

.admin-nav {
  width: min(1120px, calc(100% - 36px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.admin-nav form {
  margin-left: auto;
}

.admin-nav .nav-dropdown-menu {
  left: 0;
  right: auto;
}

.admin-nav .nav-dropdown-trigger {
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 14px;
}

.admin-nav button,
.danger {
  min-height: 34px;
  padding: 5px 12px;
}

.admin-page table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

.inline-weight-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.inline-weight-form input {
  width: 96px;
  min-height: 34px;
  padding: 6px 8px;
}

.inline-weight-form button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.stats div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 42px;
  font-weight: 800;
}

.stats span {
  display: block;
  font-size: 15px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 650;
}

.form-subtitle {
  margin: 26px 0 14px;
  font-size: 20px;
}

.photo-field {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.photo-field img {
  width: 128px;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel);
}

.photo-field img.cover-placeholder-image {
  object-fit: contain;
  padding: 16px;
  border: 1px dashed var(--line);
  background: var(--panel);
}

.wide-photo-field {
  grid-template-columns: 220px minmax(0, 1fr);
}

.wide-photo-field img {
  width: 220px;
  height: 145px;
}

.social-link-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.danger {
  margin-top: 24px;
  border-color: var(--accent);
  background: var(--accent);
}

@media (max-width: 860px) {
  .site-header,
  .feature,
  .site-footer {
    display: block;
  }

  nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .nav-dropdown-menu {
    right: auto;
    left: 0;
  }

  .grid,
  .people-grid,
  .split,
  .social-link-fields,
  .option-grid,
  .photo-field,
  .stats {
    grid-template-columns: 1fr;
  }

  .news-carousel .news-card {
    width: 280px;
    flex-basis: 280px;
  }

  .person-card img {
    width: min(156px, 100%);
  }

  .feature {
    padding-top: 24px;
  }

  .people-overview-head {
    top: 132px;
    display: block;
  }

  .people-jump-nav {
    justify-content: flex-start;
    margin-top: 8px;
  }
}
