:root {
  --bg: #0b1020;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.05);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted-2: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --primary: #7c5cff;
  --primary-2: #2dd4bf;
  --ring: rgba(124, 92, 255, 0.45);
  --max: 1120px;
}



@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: rgba(15, 23, 42, 0.06);
    --surface-2: rgba(15, 23, 42, 0.04);
    --text: rgba(2, 6, 23, 0.92);
    --muted: rgba(2, 6, 23, 0.7);
    --muted-2: rgba(2, 6, 23, 0.55);
    --border: rgba(2, 6, 23, 0.12);
    --shadow: 0 14px 50px rgba(2, 6, 23, 0.12);
    --primary: #5b57ff;
    --primary-2: #0ea5e9;
    --ring: rgba(91, 87, 255, 0.2);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 18% 10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(1000px 700px at 80% 0%, rgba(45, 212, 191, 0.22), transparent 55%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

strong {
  font-weight: 650;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 10px;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 9999;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
}

@media (prefers-color-scheme: light) {
  .site-header {
    background: rgba(255, 255, 255, 0.75);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.22);
}

.brand-text {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.nav-link:hover {
  text-decoration: none;
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.nav-link[data-active="true"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.menu-button {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 650;
  cursor: pointer;
  gap: 10px;
  align-items: center;
}

.menu-button__label {
  font-size: 14px;
}

.menu-button__icon {
  width: 18px;
  height: 12px;
  position: relative;
  display: inline-block;
}

.menu-button__icon::before,
.menu-button__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.menu-button__icon::before {
  top: 1px;
}
.menu-button__icon::after {
  bottom: 1px;
}

/* Hero */
.hero {
  padding: 56px 0 10px;
}

#publications.section {
  padding-top: 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}

.kicker {
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}

.hero-title {
  font-size: clamp(40px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}

.hero-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
}

.hero-body {
  margin: 0 0 20px;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  background: var(--surface);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.22);
}

.button.primary:hover {
  filter: brightness(1.04);
}

.quick-facts {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.quick-fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
}

.quick-fact dt {
  color: var(--muted-2);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-fact dd {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* Cards + sections */
.section {
  padding: 46px 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  .section.alt {
    background: rgba(2, 6, 23, 0.02);
  }
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

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

.card {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card.subtle {
  background: transparent;
  box-shadow: none;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li {
  margin: 8px 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}

.chip:hover {
  text-decoration: none;
  background: var(--surface);
}

.prose {
  max-width: 72ch;
  color: var(--muted);
}

.prose p {
  margin: 0;
}

.spacer {
  height: 22px;
}

/* Publications */
.pub-list {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.pub {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 16px;
  padding: 14px 14px 12px;
}

.pub-title {
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}

.pub-title a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pub-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

/* Footer */
.site-footer {
  padding: 26px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.footer-inner p {
  margin: 0;
}

.back-to-top {
  color: var(--muted);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu-button {
    display: inline-flex;
  }

  .nav {
    display: none;
  }

  body[data-menu-open="true"] .nav {
    display: grid;
    position: absolute;
    right: 24px;
    top: 62px;
    width: min(360px, calc(100vw - 48px));
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
  }
}

/* WordPress/mobile: force the same light palette on Page 10 */
body.page-id-10 {
  background: #ffffff !important;
  color: rgba(2, 6, 23, 0.92) !important;
  color-scheme: light;
}

#publications.section {
  padding-bottom: 24px;
}

#working-papers.section {
  padding-top: 1px;
}

#working-papers.section {
  padding-bottom: 1px;
}


body.page-id-10 .site-wrap,
body.page-id-10 #container,
body.page-id-10 .site-main,
body.page-id-10 #content,
body.page-id-10 .content,
body.page-id-10 .entry-content {
  background: transparent !important;
}

body.page-id-10 .card,
body.page-id-10 .pub {
  background: #f2f2f2 !important;
}

@media (max-width: 520px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-row .button {
    width: 100%;
  }
  .card-actions .button {
    width: 100%;
  }
}

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


/* Page 10: hide ONLY Arba theme header/footer */
.page-id-10 #header,
.page-id-10 #footer,
.page-id-10 .footer,
.page-id-10 .footer-copyright {
  display: none !important;
}

/* Page 10: remove Arba content width constraints (WP wrappers included) */
.page-id-10 .site-wrap,
.page-id-10 .site-row,
.page-id-10 .site-main,
.page-id-10 .content__sidebar,
.page-id-10 .hentry,
.page-id-10 .entry-content,
.page-id-10 #content,
.page-id-10 .content,
.page-id-10 .sidebar {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* Page 10: buttons look correct (Arba link hover opacity + primary text color) */
.page-id-10 .button.primary { color: #fff !important; }
.page-id-10 .button,
.page-id-10 .button:hover { opacity: 1 !important; }


@media (max-width: 600px) {
  body.page-id-10 {
    background: #0b1020 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    color-scheme: dark;
  }

  body.page-id-10 .muted {
    color: rgba(255, 255, 255, 0.78) !important;
  }

  body.page-id-10 a {
    color: inherit !important;
  }

  body.page-id-10 .card,
  body.page-id-10 .pub {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
  }

  body.page-id-10 .button {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: rgba(255, 255, 255, 0.92) !important;
  }

  body.page-id-10 .button.primary {
    color: #ffffff !important;
  }
}


@media (max-width: 600px) {
  body.page-id-10 h1,
  body.page-id-10 h2,
  body.page-id-10 h3,
  body.page-id-10 h4,
  body.page-id-10 h5,
  body.page-id-10 h6,
  body.page-id-10 .section-head h2,
  body.page-id-10 .section-head h3,
  body.page-id-10 .card-title,
  body.page-id-10 .pub-title {
    color: rgba(255, 255, 255, 0.92) !important;
  }
}



/* Static-site additions */
main { display: block; }
.nav { flex-wrap: wrap; }
@media (max-width: 700px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; }
  .nav-link { padding-left: 0; }
}
