/* Wikipedia Vector-inspired portfolio skin */
:root {
  color-scheme: light;
  --background: #fff;
  --surface: #f8f9fa;
  --surface-raised: #fff;
  --surface-hover: #eaf3fb;
  --text: #202122;
  --muted: #54595d;
  --faint: #72777d;
  --border: #a2a9b1;
  --border-soft: #c8ccd1;
  --rule: #eaecf0;
  --link: #36c;
  --link-visited: #6b4ba1;
  --infobox-title: #c3d6ef;
  --infobox-subtitle: #dce9f5;
  --infobox-label: #eaf3fb;
  --infobox-section: #e6e6fa;
  --focus: #36c;
  --shadow: rgb(0 0 0 / 14%);
  --serif: "Linux Libertine", "Iowan Old Style", "Palatino Linotype", Georgia, Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Lato, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #101418;
  --surface: #1e2328;
  --surface-raised: #1e2328;
  --surface-hover: #2a3441;
  --text: #eaecf0;
  --muted: #a2a9b1;
  --faint: #a2a9b1;
  --border: #54595d;
  --border-soft: #3d4146;
  --rule: #3d4146;
  --link: #69f;
  --link-visited: #a78fcf;
  --infobox-title: #1f3a5f;
  --infobox-subtitle: #182f4d;
  --infobox-label: #1a2332;
  --infobox-section: #2d2d4e;
  --focus: #69f;
  --shadow: rgb(0 0 0 / 45%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--background);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border-radius: 0;
}

img {
  max-width: 100%;
}

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

a:visited {
  color: var(--link-visited);
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  color: var(--text);
  background: color-mix(in srgb, var(--link) 24%, transparent);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  color: #fff;
  background: #36c;
  transform: translateY(-140%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

/* Header */
.global-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1440px;
  height: 50px;
  padding: 0 2.75rem;
  margin: 0 auto;
  isolation: isolate;
}

.global-header::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  content: "";
  background: var(--background);
  border-bottom: 1px solid var(--border);
  transform: translateX(-50%);
}

.global-header__start,
.global-header__end,
.sticky-header__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.global-header__start {
  gap: 10px;
}

.global-header__center {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.global-header__end {
  gap: 4px;
  font-size: 0.875rem;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 7px;
  cursor: pointer;
  background: transparent;
  border: 0;
  place-items: center;
}

.icon-button:hover {
  background: var(--surface);
}

.icon-button svg,
.header-link svg,
.search svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wiki-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  color: var(--text) !important;
  text-decoration: none !important;
}

.wiki-logo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.wiki-logo__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wiki-logo__copy strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.wiki-logo__copy small {
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  color: var(--link) !important;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.header-link svg {
  width: 15px;
  height: 15px;
}

.header-link:hover {
  text-decoration: underline;
}

.header-divider {
  color: var(--border);
  user-select: none;
}

/* Search */
.search {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search__box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 32px;
  padding: 4px 9px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.search:focus-within .search__box,
.search.is-open .search__box {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.search.is-open .search__box {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.search__box svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--faint);
}

.search__box input {
  min-width: 0;
  width: 100%;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  appearance: none;
}

.search__box input::-webkit-search-cancel-button {
  display: none;
}

.search__box input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.search__box kbd {
  padding: 0 5px;
  color: var(--faint);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.7rem;
  line-height: 1.5;
}

.search__results {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  z-index: 350;
  max-height: 330px;
  overflow-y: auto;
  background: var(--surface-raised);
  border: 1px solid var(--focus);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 5px 14px var(--shadow);
}

.search-result {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px 11px;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result[aria-selected="true"] {
  background: var(--surface-hover);
}

.search-result__section {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-result__title {
  overflow: hidden;
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result__excerpt {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.search-mark {
  color: inherit;
  background: color-mix(in srgb, #ffdb58 60%, transparent);
}

/* Scroll replacement header */
.sticky-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 1.25rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  transform: translateY(-105%);
  transition: transform 150ms ease;
}

.sticky-header.is-visible {
  transform: translateY(0);
}

.sticky-header__title {
  flex: 1;
  overflow: hidden;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-header__search {
  width: 230px;
}

.search--compact {
  max-width: 230px;
}

.search--compact .search__box {
  min-height: 29px;
  padding: 3px 8px;
}

.search--compact .search__box input {
  font-size: 0.8125rem;
}

.sticky-header__actions {
  gap: 5px;
}

.sticky-header__talk {
  padding: 3px 10px;
  color: var(--link) !important;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* Menu and appearance */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 499;
  background: rgb(0 0 0 / 34%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.menu-backdrop.is-visible {
  opacity: 1;
}

.site-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  width: min(330px, 88vw);
  padding: 14px 18px 24px;
  overflow-y: auto;
  background: var(--surface-raised);
  border-right: 1px solid var(--border);
  box-shadow: 6px 0 20px var(--shadow);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}

.site-menu.is-open {
  transform: translateX(0);
}

.site-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.site-menu nav {
  padding: 16px 0;
}

.site-menu nav strong {
  display: block;
  padding: 0 8px 5px;
  font-size: 0.8125rem;
}

.site-menu nav a {
  display: block;
  padding: 5px 8px;
  color: var(--link);
}

.site-menu nav a:hover {
  background: var(--surface-hover);
  text-decoration: none;
}

.site-menu nav .menu-sub-link {
  padding-left: 25px;
  font-size: 0.8125rem;
}

.site-menu__links {
  display: grid;
  gap: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}

.site-menu__links a {
  padding: 4px 8px;
}

.appearance-panel {
  position: fixed;
  z-index: 600;
  width: 245px;
  padding: 14px 16px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: 0 5px 18px var(--shadow);
}

.appearance-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.appearance-panel__header strong {
  font-size: 1rem;
}

.appearance-panel p {
  margin: 11px 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.appearance-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 1px;
  cursor: pointer;
}

.appearance-panel input {
  accent-color: var(--link);
}

/* Article shell */
.page-shell {
  width: 100%;
  max-width: 1600px;
  min-height: calc(100vh - 50px);
  padding: 0 2.75rem;
  margin: 0 auto;
}

.content {
  min-width: 0;
  padding: 12px 0 34px;
}

.loading-state {
  padding: 30px 0;
  color: var(--muted);
}

.article-title-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}

.article-title {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.article-subtitle {
  margin: 3px 0 4px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.article-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 6px 0 14px;
  border-bottom: 1px solid var(--border);
}

.article-tabs {
  display: flex;
  align-items: flex-end;
  padding: 0;
  margin: 0;
  list-style: none;
}

.article-tab {
  position: relative;
  bottom: -1px;
  display: inline-block;
  padding: 5px 14px;
  color: var(--link) !important;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
}

button.article-tab {
  font: inherit;
}

.article-tab.is-active {
  color: var(--text) !important;
  background: var(--background);
  border-color: var(--border) var(--border) var(--background);
}

.article-tab:hover:not(.is-active) {
  background: var(--surface);
  border-color: var(--border) var(--border) var(--surface);
  text-decoration: none;
}

.article-hatnote {
  padding: 3px 0 4px 1.6em;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.875em;
  font-style: italic;
}

.article-body::after {
  display: block;
  clear: both;
  content: "";
}

.lead {
  margin-bottom: 16px;
  font-size: 0.9375em;
  line-height: 1.667;
}

.lead p {
  margin: 0 0 0.9em;
}

/* Infobox */
.infobox {
  float: right;
  clear: right;
  width: 25.5em;
  margin: 0.5em 0 1.3em 1.4em;
  overflow: hidden;
  font-size: 0.875em;
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--border);
}

.infobox__title {
  padding: 6px 10px;
  text-align: center;
  background: var(--infobox-title);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.infobox__subtitle {
  padding: 4px 10px;
  text-align: center;
  background: var(--infobox-subtitle);
  border-bottom: 1px solid var(--border);
  font-size: 0.9em;
  font-style: italic;
}

.infobox__image-cell {
  padding: 9px;
  text-align: center;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}

.infobox__image {
  display: block;
  width: min(260px, 100%);
  height: auto;
  max-height: 350px;
  margin: 0 auto;
  object-fit: cover;
  object-position: center top;
}

.infobox__caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8125em;
  font-style: italic;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.infobox tr {
  border-bottom: 1px solid var(--rule);
}

.infobox tr:last-child {
  border-bottom: 0;
}

.infobox th,
.infobox td {
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}

.infobox th {
  width: 36%;
  color: var(--text);
  white-space: nowrap;
  background: var(--infobox-label);
  font-weight: 700;
}

.infobox td {
  overflow-wrap: anywhere;
  color: var(--text);
  background: var(--surface-raised);
}

.infobox .infobox__section {
  padding: 4px 8px;
  text-align: center;
  background: var(--infobox-section);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.9em;
}

.infobox a:visited {
  color: var(--link);
}

/* Table of contents */
.toc {
  float: left;
  clear: left;
  min-width: 185px;
  max-width: 255px;
  padding: 8px 14px 12px;
  margin: 0 24px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.5;
}

.toc.is-collapsed {
  display: inline-flex;
  float: none;
  flex-direction: column;
  min-width: 0;
  max-width: none;
  padding: 6px 10px;
  margin: 0 0 12px;
}

.toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.toc.is-collapsed .toc__header {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.toc__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
  font-weight: 700;
}

.toc__heading svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.toc__toggle {
  padding: 0;
  color: var(--link);
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 0.8em;
}

.toc__toggle:hover {
  text-decoration: underline;
}

.toc ol,
.toc ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.toc li {
  margin: 3px 0;
}

.toc a {
  color: var(--link) !important;
}

.toc a.is-current {
  color: var(--text) !important;
  font-weight: 600;
}

.toc__number {
  display: inline-block;
  margin-right: 5px;
  color: var(--text);
  font-size: 0.9em;
}

.toc__sublist {
  padding-left: 1.25em !important;
  margin: 2px 0 !important;
}

.toc[hidden] {
  display: none;
}

/* Article typography */
.article-section {
  scroll-margin-top: 62px;
}

.article-section h2,
.why-heading {
  padding-bottom: 2px;
  margin: 24px 0 8px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1.3;
  border-bottom: 1px solid var(--border);
}

.article-section h3 {
  margin: 16px 0 5px;
  color: var(--text);
  font-size: 1.02em;
  line-height: 1.45;
}

.article-section p {
  margin: 0 0 0.8em;
  font-size: 0.9375em;
  line-height: 1.667;
}

.skill-line {
  margin-bottom: 0.35em !important;
}

.article-list {
  padding: 0;
  margin: 4px 0 12px 1.6em;
  font-size: 0.9375em;
  line-height: 1.667;
}

.article-list li {
  margin-bottom: 3px;
}

.meta {
  color: var(--muted);
  font-size: 0.875em;
}

.skills-table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 0.9375em;
}

.skills-table th,
.skills-table td {
  padding: 5px 10px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
}

.skills-table th {
  width: 16%;
  background: var(--rule);
}

.experience-entry,
.project-entry,
.contribution-entry,
.leadership-entry {
  display: flow-root;
  margin-bottom: 12px;
}

.experience-entry:last-child,
.project-entry:last-child,
.contribution-entry:last-child,
.leadership-entry:last-child {
  margin-bottom: 0;
}

.project-entry {
  scroll-margin-top: 62px;
}

.project-entry__title {
  font-weight: 700;
}

.project-entry__links {
  white-space: nowrap;
}

.project-entry__tech {
  color: var(--muted);
  font-size: 0.875em !important;
}

.project-entry__tech strong {
  color: var(--text);
}

.status-label {
  color: var(--muted);
  font-size: 0.85em;
  font-style: italic;
}

.ref-link {
  vertical-align: super;
  color: var(--link) !important;
  font-size: 0.75em;
  line-height: 1;
}

/* Gallery */
.gallery-section,
.references-section,
.external-links-section,
.why-section,
.categories {
  clear: both;
}

.gallery-shell {
  display: grid;
  grid-template-columns: 44px minmax(0, 770px) 44px;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 22px 0 26px;
}

.gallery-control {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 9px;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 50%;
  place-items: center;
}

.gallery-control:hover {
  background: var(--rule);
}

.gallery-control svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}

.gallery-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(280px, 33vw, 430px);
  padding: 10px;
  overflow: hidden;
  background: var(--surface-raised);
}

.gallery-card__media img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-position: center;
}

.gallery-card__media img[data-fit="contain"] {
  object-fit: contain;
}

.gallery-card__media img[data-fit="cover"] {
  object-fit: cover;
}

.gallery-card figcaption {
  min-height: 34px;
  padding: 5px 12px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--rule);
  font-size: 0.875em;
}

.gallery-status {
  margin: -17px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 0;
  margin: 0 0 10px;
  list-style: none;
}

.gallery-dot {
  display: block;
  width: 7px;
  height: 7px;
  padding: 0;
  cursor: pointer;
  background: var(--border);
  border: 0;
  border-radius: 50%;
}

.gallery-dot.is-active {
  background: var(--link);
  box-shadow: 0 0 0 2px var(--background), 0 0 0 3px var(--link);
}

/* References, rationale and footer */
.reference-list {
  column-count: 2;
  column-gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.875em;
}

.reference-list li {
  margin-bottom: 5px;
  break-inside: avoid;
}

.reference-list li::before {
  color: var(--muted);
  font-weight: 700;
  content: attr(data-number) ". ";
}

.reference-list a:visited,
.external-link-list a:visited,
.categories a:visited,
.wiki-footer a:visited {
  color: var(--link);
}

.external-link-list {
  padding: 0;
  margin: 4px 0 12px 1.6em;
  font-size: 0.9375em;
}

.why-card {
  padding: 12px 14px;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}

.why-card__lead {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.02em;
  font-weight: 600;
  line-height: 1.45;
}

.why-card__body {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.categories {
  padding: 8px 0;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875em;
}

.categories strong {
  margin-right: 6px;
}

.categories a {
  margin-right: 7px;
}

.wiki-footer {
  width: calc(100% - 5.5rem);
  max-width: calc(1600px - 5.5rem);
  padding: 16px 0 28px;
  margin: 0 auto;
  color: var(--muted);
  background: var(--background);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

.wiki-footer p {
  margin: 0 0 5px;
}

.wiki-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.wiki-footer__links li + li::before {
  color: var(--border);
  content: "·";
}

.wiki-footer__links a,
.wiki-footer__links button {
  padding: 2px 6px;
  color: var(--link);
  cursor: pointer;
  background: transparent;
  border: 0;
}

.wiki-footer__links button:hover {
  text-decoration: underline;
}

.noscript-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 700;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px var(--shadow);
  font-size: 0.8125rem;
}

.search-target-flash {
  animation: target-flash 1.25s ease-out;
}

@keyframes target-flash {
  0%,
  30% {
    background: color-mix(in srgb, #ffdb58 42%, transparent);
  }
  100% {
    background: transparent;
  }
}

/* Tablet */
@media (max-width: 1119px) {
  .global-header,
  .page-shell {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .wiki-footer {
    width: calc(100% - 2.5rem);
  }

  .global-header__end .header-divider,
  .global-header__end > a:first-of-type {
    display: none;
  }
}

@media (max-width: 900px) {
  .global-header .wiki-logo__copy {
    display: none;
  }

  .global-header {
    gap: 9px;
  }

  .global-header__end .header-link span {
    display: none;
  }

  .toc {
    float: none;
    clear: none;
    width: calc(100% - 27.5em);
    max-width: none;
    margin: 0 0 16px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  html {
    scroll-padding-top: 56px;
  }

  body {
    font-size: 14px;
  }

  .global-header {
    gap: 8px;
    height: 48px;
    padding: 0 0.75rem;
  }

  .global-header__start {
    gap: 2px;
  }

  .wiki-logo img {
    width: 38px;
    height: 38px;
  }

  .global-header__end {
    gap: 0;
  }

  .global-header__end .header-divider,
  .global-header__end a.header-link,
  .search__box kbd {
    display: none;
  }

  .appearance-button span {
    display: none;
  }

  .appearance-button {
    padding: 7px;
  }

  .appearance-button svg {
    width: 17px;
    height: 17px;
  }

  .search {
    max-width: none;
  }

  .search__box {
    min-height: 30px;
  }

  .sticky-header {
    gap: 5px;
    height: 48px;
    padding: 0 0.75rem;
  }

  .sticky-header__title {
    max-width: 33vw;
  }

  .sticky-header__search {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .sticky-header__actions .appearance-button,
  .sticky-header__talk {
    display: none;
  }

  .page-shell {
    padding: 0 0.75rem;
  }

  .content {
    padding: 8px 0 24px;
  }

  .article-title {
    font-size: 1.55rem;
  }

  .article-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }

  .article-tab {
    padding: 4px 9px;
    font-size: 0.8125rem;
  }

  .article-tabs--right .article-tab:nth-child(2),
  .article-tabs--right .article-tab:nth-child(3) {
    display: none;
  }

  .article-hatnote {
    padding-left: 0;
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 16px;
    font-size: 0.8125em;
  }

  .infobox__image {
    width: min(320px, 86vw);
    max-height: none;
  }

  .toc,
  .toc.is-collapsed {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
  }

  .article-section h2,
  .why-heading {
    font-size: 1.3em;
  }

  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table th,
  .skills-table td {
    display: block;
    width: 100%;
  }

  .skills-table tr + tr th {
    border-top: 0;
  }

  .skills-table td {
    border-top: 0;
  }

  .gallery-shell {
    position: relative;
    display: block;
    padding: 12px 0 22px;
  }

  .gallery-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 8px;
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    box-shadow: 0 1px 5px var(--shadow);
    transform: translateY(-50%);
  }

  .gallery-control--prev {
    left: 7px;
  }

  .gallery-control--next {
    right: 7px;
  }

  .gallery-card__media {
    height: clamp(210px, 62vw, 330px);
    padding: 4px;
  }

  .gallery-card figcaption {
    padding-right: 40px;
    padding-left: 40px;
  }

  .reference-list {
    column-count: 1;
  }

  .why-card {
    padding: 11px 12px;
  }

  .wiki-footer {
    width: calc(100% - 1.5rem);
    padding: 12px 0 20px;
  }

  .appearance-panel {
    top: 56px !important;
    right: 12px !important;
    left: auto !important;
    width: min(260px, calc(100vw - 24px));
  }
}

@media (max-width: 420px) {
  .global-header__center {
    justify-content: stretch;
  }

  .global-header__start .wiki-logo {
    display: none;
  }

  .article-tabs--right .article-tab:not(:last-child) {
    display: none;
  }

  .infobox th {
    width: 34%;
    white-space: normal;
  }

  .gallery-card__media {
    height: 225px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root,
  html[data-theme="dark"] {
    color-scheme: light;
    --background: #fff;
    --surface: #f8f9fa;
    --surface-raised: #fff;
    --text: #000;
    --muted: #444;
    --border: #999;
    --rule: #ddd;
    --link: #000;
    --link-visited: #000;
  }

  body {
    font-size: 10pt;
  }

  .global-header,
  .sticky-header,
  .site-menu,
  .menu-backdrop,
  .appearance-panel,
  .article-toolbar,
  .toc,
  .gallery-control,
  .gallery-dots,
  .gallery-status,
  .wiki-footer__links,
  .toast {
    display: none !important;
  }

  .page-shell,
  .wiki-footer {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .article-section,
  .project-entry,
  .gallery-card,
  .infobox {
    break-inside: avoid;
  }

  .gallery-shell {
    display: block;
  }

  .gallery-card__media {
    height: 340px;
  }

  a {
    text-decoration: underline;
  }
}
