@import url('colors_and_type.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--rmai-font-sans);
  color: var(--rmai-fg-1);
  background: var(--rmai-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }

/* Wordmark */
.wordmark { line-height: 1.1; font-family: var(--rmai-font-sans); }
.wordmark .l1 { font-weight: 800; color: var(--rmai-fg-1); letter-spacing: -0.02em; }
.wordmark .l2 { font-weight: 500; color: var(--rmai-purple); letter-spacing: -0.02em; }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rmai-purple);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rmai-font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 6px;
  transition: background 180ms var(--rmai-ease), color 180ms var(--rmai-ease), border-color 180ms var(--rmai-ease), transform 80ms var(--rmai-ease);
  line-height: 1.2;
  white-space: nowrap;
}
.btn--cta { background: var(--rmai-orange); color: #fff; }
.btn--cta:hover { background: color-mix(in srgb, var(--rmai-orange) 92%, #000); }
.btn--cta:active { transform: translateY(1px); }
.btn--primary { background: var(--rmai-fg-1); color: #fff; }
.btn--primary:hover { background: #33343E; }
.btn--secondary { background: #fff; color: var(--rmai-fg-1); border: 1px solid var(--rmai-border); }
.btn--secondary:hover { border-color: var(--rmai-fg-1); }
.btn--ghost { color: var(--rmai-purple); padding: 6px 0; }
.btn--ghost:hover { color: var(--rmai-fg-1); }

/* Promo bar at top of page */
.promo-bar {
  background: var(--rmai-fg-1);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.01em;
}
.promo-bar a { color: var(--rmai-orange); font-weight: 600; }
.promo-bar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rmai-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.site-header nav {
  display: flex;
  gap: 28px;
}
.site-header nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--rmai-fg-1);
  transition: color 120ms var(--rmai-ease);
}
.site-header nav a:hover { color: var(--rmai-purple); }
.site-header nav a.active { color: var(--rmai-purple); }
.site-header__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--rmai-fg-2);
  font-family: var(--rmai-font-mono);
  letter-spacing: 0.02em;
  transition: color 120ms var(--rmai-ease);
}
.site-header__back:hover { color: var(--rmai-purple); }

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--rmai-fg-mut);
  letter-spacing: 0.02em;
  font-family: var(--rmai-font-mono);
}
.breadcrumb a { color: var(--rmai-fg-mut); }
.breadcrumb a:hover { color: var(--rmai-purple); }
.breadcrumb .sep { color: var(--rmai-fg-mut); margin: 0 10px; }
.breadcrumb .current { color: var(--rmai-fg-1); }

/* Hero */
.hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rmai-border);
  position: relative;
  overflow: hidden;
}
.hero__motif {
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px;
  opacity: 0.55;
  pointer-events: none;
}
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--rmai-fg-1);
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--rmai-purple); }
.hero__lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--rmai-fg-2);
  max-width: 62ch;
  margin-top: 24px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-top: 36px;
  font-family: var(--rmai-font-mono);
  font-size: 12px;
  color: var(--rmai-fg-2);
  align-items: center;
}
.hero__meta .dot { color: var(--rmai-green); }
.hero__meta .sep { color: var(--rmai-fg-mut); }

/* Toolbar (search + view toggle) */
.toolbar {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: rgba(250,250,250,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rmai-border);
  padding: 14px 0;
}
.toolbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--rmai-border);
  border-radius: 8px;
  padding: 9px 14px;
  flex: 1;
  min-width: 240px;
  transition: border-color 120ms var(--rmai-ease), box-shadow 120ms var(--rmai-ease);
}
.search:focus-within { border-color: var(--rmai-purple); box-shadow: 0 0 0 3px rgba(167, 122, 205, 0.15); }
.search svg { color: var(--rmai-fg-mut); flex-shrink: 0; }
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  font-family: var(--rmai-font-sans);
  font-size: 14px;
  color: var(--rmai-fg-1);
  background: transparent;
}
.search input::placeholder { color: var(--rmai-fg-mut); }
.search kbd {
  font-family: var(--rmai-font-mono);
  font-size: 10px;
  color: var(--rmai-fg-mut);
  border: 1px solid var(--rmai-border);
  border-radius: 3px;
  padding: 2px 5px;
  background: var(--rmai-bg);
}

.toolbar__count {
  font-family: var(--rmai-font-mono);
  font-size: 12px;
  color: var(--rmai-fg-mut);
  white-space: nowrap;
}

.view-toggle {
  display: flex;
  background: #fff;
  border: 1px solid var(--rmai-border);
  border-radius: 8px;
  padding: 3px;
}
.view-toggle button {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  color: var(--rmai-fg-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 120ms var(--rmai-ease), color 120ms var(--rmai-ease);
}
.view-toggle button.active {
  background: var(--rmai-fg-1);
  color: #fff;
}

/* Layout — sidebar + content */
.page-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 48px 0 96px;
}
@media (max-width: 920px) {
  .page-grid { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { position: static !important; }
}

.sidebar {
  position: sticky;
  top: 152px;
  align-self: start;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 8px;
}
.sidebar__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rmai-fg-mut);
  margin-bottom: 14px;
}
.sidebar__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--rmai-fg-2);
  transition: background 120ms var(--rmai-ease), color 120ms var(--rmai-ease);
  border-left: 2px solid transparent;
}
.sidebar__item:hover { background: var(--rmai-lavender); color: var(--rmai-fg-1); }
.sidebar__item.active {
  background: var(--rmai-lavender);
  color: var(--rmai-purple);
  border-left-color: var(--rmai-purple);
  font-weight: 600;
}
.sidebar__item .count {
  font-family: var(--rmai-font-mono);
  font-size: 11px;
  color: var(--rmai-fg-mut);
}
.sidebar__divider {
  height: 1px;
  background: var(--rmai-border);
  margin: 16px 0;
}
.sidebar__filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--rmai-fg-2);
  transition: color 120ms var(--rmai-ease);
}
.sidebar__filter:hover { color: var(--rmai-fg-1); }
.sidebar__filter input { accent-color: var(--rmai-purple); cursor: pointer; }

/* Category section */
.cat-section { margin-bottom: 64px; scroll-margin-top: 152px; }
.cat-section:last-child { margin-bottom: 0; }
.cat-section__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}
.cat-section__num {
  font-family: var(--rmai-font-mono);
  font-size: 12px;
  color: var(--rmai-purple);
  font-weight: 500;
}
.cat-section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--rmai-fg-1);
}
.cat-section__sub {
  font-size: 15px;
  color: var(--rmai-fg-2);
  margin-bottom: 28px;
  max-width: 60ch;
  line-height: 1.5;
}
.cat-section__rule {
  height: 1px;
  background: var(--rmai-border);
  margin: 0 0 28px;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.card-grid--list {
  grid-template-columns: 1fr;
}

/* Skill card */
.card {
  background: #fff;
  border: 1px solid var(--rmai-border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 120ms var(--rmai-ease), transform 120ms var(--rmai-ease), box-shadow 120ms var(--rmai-ease);
  position: relative;
}
.card:hover {
  border-color: #d6d6dc;
  box-shadow: 0 1px 8px rgba(26,27,37,0.06);
}
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card__title-wrap { display: flex; flex-direction: column; gap: 4px; }
.card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--rmai-fg-1);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.card__source {
  font-family: var(--rmai-font-mono);
  font-size: 11px;
  color: var(--rmai-fg-mut);
}
.card__source a { color: var(--rmai-fg-mut); transition: color 120ms var(--rmai-ease); }
.card__source a:hover { color: var(--rmai-purple); text-decoration: underline; text-underline-offset: 2px; }
.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--rmai-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rmai-lavender);
  color: var(--rmai-purple);
  white-space: nowrap;
  flex-shrink: 0;
}
.card__badge--essential {
  background: rgba(34, 197, 94, 0.08);
  color: #15803D;
}
.card__badge--essential .dot {
  width: 5px; height: 5px;
  background: var(--rmai-green);
  border-radius: 50%;
}

.card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--rmai-fg-2);
  flex: 1;
}

.card__details {
  font-size: 13px;
  line-height: 1.6;
  color: var(--rmai-fg-2);
  border-left: 2px solid var(--rmai-purple);
  padding: 2px 0 2px 14px;
  background: var(--rmai-lavender);
  border-radius: 0 6px 6px 0;
  padding: 12px 14px;
  border-left: 2px solid var(--rmai-purple);
}
.card__details strong { color: var(--rmai-fg-1); font-weight: 600; }
.card__details code {
  font-family: var(--rmai-font-mono);
  font-size: 12px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(167,122,205,0.2);
  border-radius: 3px;
  padding: 1px 5px;
}

/* Install command */
.install {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--rmai-fg-1);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--rmai-font-mono);
  font-size: 12px;
}
.install__prompt {
  color: var(--rmai-purple);
  padding: 10px 0 10px 14px;
  user-select: none;
}
.install__cmd {
  flex: 1;
  color: #fff;
  padding: 10px 12px 10px 6px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.install__cmd::-webkit-scrollbar { display: none; }
.install__copy {
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 10px 12px;
  font-family: var(--rmai-font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 120ms var(--rmai-ease), color 120ms var(--rmai-ease);
  min-width: 76px;
  justify-content: center;
}
.install__copy:hover { background: rgba(255,255,255,0.12); }
.install__copy.copied { color: var(--rmai-green); }
.install__copy svg { width: 12px; height: 12px; }

/* Card meta footer */
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--rmai-font-mono);
  font-size: 11px;
  color: var(--rmai-fg-mut);
}
.card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rmai-stone);
  color: var(--rmai-fg-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: var(--rmai-font-sans);
}
.invoke {
  font-family: var(--rmai-font-mono);
  font-size: 11px;
  color: var(--rmai-fg-2);
}
.invoke code {
  background: var(--rmai-stone);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--rmai-fg-1);
}

/* Footer */
.site-footer {
  background: var(--rmai-fg-1);
  color: #fff;
  padding: 64px 0 32px;
  margin-top: 96px;
}
.site-footer .wordmark .l1 { color: #fff; }
.site-footer .wordmark .l2 { color: var(--rmai-purple); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.site-footer__cta {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer__cta-text { max-width: 56ch; }
.site-footer__cta-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rmai-purple); margin-bottom: 10px;
}
.site-footer__cta h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.site-footer__cta p { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 8px; line-height: 1.5; }
.site-footer h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { color: #fff; font-size: 14px; }
.site-footer ul a:hover { color: var(--rmai-purple); }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__tag {
  font-style: italic;
  letter-spacing: 0.06em;
}
.site-footer__tag .dash { color: var(--rmai-purple); margin-right: 6px; font-style: normal; }

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--rmai-fg-mut);
}
.empty h3 { font-size: 18px; color: var(--rmai-fg-1); margin-bottom: 8px; }
.empty p { font-size: 14px; line-height: 1.5; }

/* ============================================================
   Live ticker marquee — mirrors mu-plugins/rmai-ticker.php styles.
   Source of truth lives on the main site; this is a port for the
   skills subdomain (no WP admin-bar offset, no body-padding hack).
   ============================================================ */
.rmai-ticker {
  background: linear-gradient(90deg, #1A1B25 0%, #2D1F3D 100%);
  color: #FFF;
  padding: 10px 0;
  overflow: hidden;
  border-bottom: 2px solid var(--rmai-purple);
  font-family: var(--rmai-font-sans);
}
.rmai-ticker__track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: rmai-ticker-scroll 110s linear infinite;
  width: max-content;
  padding-left: 32px;
}
.rmai-ticker__item {
  font-family: var(--rmai-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.rmai-ticker__label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--rmai-purple);
  padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,0.18);
}
.rmai-ticker__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rmai-green);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: rmai-ticker-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.rmai-ticker__sep { color: rgba(255,255,255,0.25); }
.rmai-ticker__cta { color: var(--rmai-purple); text-decoration: none; font-weight: 700; }
.rmai-ticker__cta:hover { color: #FFF; }
@keyframes rmai-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes rmai-ticker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
@media (prefers-reduced-motion: reduce) {
  .rmai-ticker__track { animation: none; }
  .rmai-ticker__dot { animation: none; }
}
