@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--vex-accent);
  outline-offset: 2px;
}

:root {
  color-scheme: light;
  --vex-bg: #f0f4f8;
  --vex-surface: #d9e2ec;
  --vex-surface-alt: rgba(255,255,255,0.06);
  --vex-text: #2c3e50;
  --vex-text-muted: #2c3e50;
  --vex-heading: #34495e;
  --vex-accent: #9b59b6;
  --vex-accent-hover: #9b59b6;
  --vex-accent-contrast: #f0f4f8;
  --vex-border: #bdc3c7;
  --vex-shadow: #7f8c8d;
  --vex-radius-lg: 10px;
  --vex-radius-md: 10px;
  --vex-radius-sm: 10px;
  --vex-transition: 300ms ease-in-out;
  font-family: 'Open Sans, sans-serif', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  margin: 0;
  background: var(--vex-bg);
  color: var(--vex-text);
  min-height: 100vh;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 4.5rem;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--vex-heading); }
img { max-width: 100%; display: block; }
::selection { background: #e67e22; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(var(--vex-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--vex-border) 1px, transparent 1px);
  background-size: 40px 40px;
}

body > * { position: relative; z-index: 1; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--vex-border); border-radius: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather, serif', 'Open Sans, sans-serif', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--vex-heading);
  margin: 0 0 0.5em;
}

h1 { font-size: calc(18px * 1.2 * 1.2 * 1.2); }
h2 { font-size: calc(18px * 1.2 * 1.2); }
h3 { font-size: calc(18px * 1.2); }

.vex-portal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(2rem * 1.6);
}

.vex-helm {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(1rem * 1.6) calc(2rem * 1.6);
  background: linear-gradient(to bottom, var(--vex-bg), transparent);
}

.vex-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.vex-logo {
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--vex-heading);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--vex-accent);
  color: var(--vex-accent-contrast);
}

.vex-tagline {
  font-size: 0.85rem;
  color: var(--vex-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vex-arch {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vex-arch a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--vex-transition);
  padding: 0.3rem 0.5rem;
}



.vex-arch a:hover,
.vex-arch a:focus-visible {
  color: var(--vex-accent);
}

.vex-basin {
  display: grid;
  gap: calc(2rem * 1.6);
  margin-top: calc(1.5rem * 1.6);
  padding-bottom: calc(3rem * 1.6);
}

.vex-basin::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #9b59b612, transparent 60%);
}
.vex-basin { position: relative; }
.vex-basin > * { position: relative; z-index: 1; }

.vex-hero {
  position: relative;
  padding: calc(2.5rem * 1.6);
  border-radius: var(--vex-radius-lg);
  border: 1px solid var(--vex-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: calc(2rem * 1.6);
  background: var(--vex-surface);
  overflow: hidden;
}

.vex-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.15), transparent 65%);
  opacity: 0.7;
}

.vex-hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: calc(0.5rem * 1.6);
}

.vex-hero-subtitle {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  color: var(--vex-text-muted);
  margin: 0 0 0.75rem;
}

.vex-hero-intro {
  position: relative;
  z-index: 1;
  color: var(--vex-text-muted);
  line-height: 1.6;
  margin: 0;
}

.vex-grid {
  display: grid;
  gap: calc(1.5rem * 1.6);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.vex-slate {
  padding: calc(1.25rem * 1.6);
  border-radius: var(--vex-radius-lg);
  transition: var(--vex-transition);
  background: var(--vex-surface);
  border: 1px solid var(--vex-border);
}


.vex-slate::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--vex-accent), var(--vex-accent-hover), var(--vex-accent));
}
.vex-slate { position: relative; overflow: hidden; }

.vex-slate:hover {
  transform: perspective(600px) rotateX(2deg) rotateY(-2deg);
}

.vex-slate h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.vex-slate h3 a { text-decoration: none; }
.vex-slate h3 a:hover { color: var(--vex-accent); }
.vex-slate p { color: var(--vex-text-muted); font-size: 0.92rem; margin: 0.25rem 0; }
.vex-slate dl { display: grid; gap: 0.25rem; margin: 0.5rem 0 0; font-size: 0.88rem; }
.vex-slate dl div { display: flex; gap: 0.5rem; }
.vex-slate dl dt { color: var(--vex-text-muted); min-width: 5rem; }
.vex-slate time { display: block; font-size: 0.8rem; color: var(--vex-text-muted); margin-top: 0.75rem; }

.vex-filters {
  margin-bottom: calc(1.5rem * 1.6);
}

.vex-filter-form {
  position: sticky;
  top: 4.5rem;
  z-index: 10;
  padding: calc(1rem * 1.6);
  background: var(--vex-bg);
  border-bottom: 1px solid var(--vex-border);
  display: grid;
  gap: calc(1rem * 1.6);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vex-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vex-filter-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vex-text-muted);
}

input, select, textarea {
  font: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: var(--vex-radius-sm);
  color: var(--vex-text);
  transition: var(--vex-transition);
  background: transparent;
  border: 1px solid var(--vex-border);
  padding-top: 1.2rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--vex-accent);
  box-shadow: 0 0 16px #9b59b640;
}

button, .vex-btn {
  font: inherit;
  cursor: pointer;
  padding: 0.6rem 1.2rem;
  border-radius: var(--vex-radius-md);
  font-weight: 600;
  transition: var(--vex-transition);
  background: var(--vex-accent);
  color: var(--vex-accent-contrast);
  border: none;
}

button:hover, .vex-btn:hover {
  transform: translateY(-1px);
}

.vex-profile {
  background: var(--vex-surface);
  border: 1px solid var(--vex-border);
  border-radius: var(--vex-radius-lg);
  padding: calc(2rem * 1.6);
  display: grid;
  gap: calc(1.5rem * 1.6);
}

.vex-profile header h1 { font-size: 2rem; }
.vex-profile-slug { font-size: 0.85rem; color: var(--vex-text-muted); }

.vex-profile-content {
  display: grid;
  gap: calc(1rem * 1.6);
  grid-template-columns: auto 1fr;
}

.vex-profile-photo img {
  border-radius: var(--vex-radius-lg);
}

.vex-profile dl { display: grid; gap: 0.35rem; font-size: 0.95rem; }
.vex-profile dl div { display: flex; gap: 0.75rem; }
.vex-profile dl dt { color: var(--vex-text-muted); min-width: 8rem; }

.vex-page {
  background: var(--vex-surface);
  border: 1px solid var(--vex-border);
  border-radius: var(--vex-radius-lg);
  padding: calc(2rem * 1.6);
  display: grid;
  gap: calc(1rem * 1.6);
}

.vex-page-header h1 { font-size: 2rem; margin: 0; }
.vex-page-header time { font-size: 0.85rem; color: var(--vex-text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.vex-page-content {
  line-height: 1.6;
  color: var(--vex-text-muted);
}
.vex-page-content p { margin-top: 0; }

.vex-taxonomy-header {
  margin-bottom: calc(1.5rem * 1.6);
}

.vex-taxonomy-header h1 { font-size: 1.8rem; }

.vex-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: calc(2rem * 1.6);
}

.vex-pagination a,
.vex-pagination span {
  padding: 0.5rem 0.9rem;
  border-radius: var(--vex-radius-sm);
  border: 1px solid var(--vex-border);
  font-size: 0.9rem;
}

.vex-pagination .vex-active {
  background: var(--vex-accent);
  color: var(--vex-accent-contrast);
  border-color: var(--vex-accent);
}

.vex-related { margin-top: calc(2rem * 1.6); }
.vex-related h2 { font-size: 1.4rem; margin-bottom: calc(1rem * 1.6); }

.vex-showcase {
  display: grid;
  gap: calc(1rem * 1.6);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.vex-showcase-item {
  border-radius: var(--vex-radius-lg);
  overflow: hidden;
  border: 1px solid var(--vex-border);
  background: var(--vex-surface);
  transition: var(--vex-transition);
}

.vex-showcase-item:hover {
  border-color: var(--vex-accent);
}

.vex-showcase-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
}

.vex-theme-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.vex-theme-name { font-weight: 600; }
.vex-theme-desc { font-size: 0.88rem; color: var(--vex-text-muted); margin: 0.15rem 0 0; }


.vex-anchor {
  border-top: 1px solid var(--vex-border);
  padding: calc(2rem * 1.6) 0;
  margin-top: calc(3rem * 1.6);
  text-align: center;
  font-size: 0.85rem;
  color: var(--vex-text-muted);
}

.vex-error {
  text-align: center;
  padding: calc(4rem * 1.6) 0;
}

.vex-error h1 { font-size: 4rem; margin-bottom: 0.5rem; }
.vex-error p { color: var(--vex-text-muted); font-size: 1.1rem; }

@media (max-width: 768px) {
  .vex-grid {
    grid-template-columns: 1fr;
  }
  .vex-filter-form {
    grid-template-columns: 1fr;
  }
  .vex-helm {
    flex-direction: column;
    text-align: center;
  }
  .vex-arch {
    justify-content: center;
  }
  .vex-hero {
    grid-template-columns: 1fr;
  }
}
