/*
Theme Name: Becomemore Shell
Theme URI: https://becomemore.dk/
Author: Codex
Description: A reusable application shell for the Becomemore universe with a fixed sidebar and a flexible main content canvas.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: becomemore-shell
*/

:root {
  --bm-color-background: #f5f5f5;
  --bm-color-surface: #ffffff;
  --bm-color-surface-muted: #f9f9f9;
  --bm-color-border: #e2e2e2;
  --bm-color-border-strong: #c8c5cd;
  --bm-color-text: #1a1c1c;
  --bm-color-text-muted: #47464c;
  --bm-color-navy: #191a2c;
  --bm-color-navy-strong: #0a0b1c;
  --bm-color-teal: #5dbab4;
  --bm-color-teal-soft: #93f0e9;
  --bm-color-teal-text: #006f6a;
  --bm-color-success: #2d6a4f;
  --bm-color-danger: #d90429;
  --bm-sidebar-width: 280px;
  --bm-content-max: 1440px;
  --bm-space-1: 8px;
  --bm-space-2: 16px;
  --bm-space-3: 24px;
  --bm-space-4: 32px;
  --bm-space-5: 40px;
  --bm-radius-sm: 4px;
  --bm-radius-md: 8px;
  --bm-shadow-soft: 0 4px 20px rgba(10, 11, 28, 0.05);
  --bm-transition: 180ms ease;
  --wp--preset--font-family--libre-franklin: "Libre Franklin", sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--wp--preset--font-family--libre-franklin);
  color: var(--bm-color-text);
  background: var(--bm-color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.bm-shell {
  min-height: 100vh;
  background: var(--bm-color-background);
}

.bm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: var(--bm-sidebar-width);
  background: var(--bm-color-navy);
  color: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.bm-sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bm-sidebar__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--bm-radius-sm);
  background: rgba(147, 240, 233, 0.16);
  color: var(--bm-color-teal-soft);
}

.bm-sidebar__brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bm-sidebar__brand-link {
  text-decoration: none;
}

.bm-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
}

.bm-sidebar__menu,
.bm-sidebar__menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-sidebar__item + .bm-sidebar__item,
.bm-sidebar__menu > li + li {
  margin-top: 8px;
}

.bm-sidebar__link,
.bm-sidebar__menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--bm-radius-md);
  color: rgba(197, 196, 220, 0.58);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition:
    background-color var(--bm-transition),
    color var(--bm-transition),
    transform var(--bm-transition);
}

.bm-sidebar__link:hover,
.bm-sidebar__link:focus-visible,
.bm-sidebar__menu a:hover,
.bm-sidebar__menu a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
}

.bm-sidebar__link:active,
.bm-sidebar__menu a:active {
  transform: scale(0.985);
}

.current-menu-item > .bm-sidebar__link,
.current-menu-ancestor > .bm-sidebar__link,
.current_page_item > .bm-sidebar__link,
.current_page_item > a,
.current_page_ancestor > a {
  background: var(--bm-color-teal-soft);
  color: var(--bm-color-teal-text);
}

.bm-sidebar__icon {
  flex: 0 0 auto;
}

.bm-sidebar__footer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(197, 196, 220, 0.7);
  font-size: 0.875rem;
}

.bm-shell__main {
  margin-left: var(--bm-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bm-topbar {
  display: none;
}

.bm-main {
  flex: 1;
  padding: var(--bm-space-3);
}

.bm-main__inner {
  width: min(100%, var(--bm-content-max));
  margin: 0 auto;
}

.bm-page-header {
  margin-bottom: var(--bm-space-3);
}

.bm-page-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.2vw, 2rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bm-color-navy-strong);
}

.bm-page-intro {
  margin: 8px 0 0;
  max-width: 72ch;
  color: var(--bm-color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.bm-content-card {
  background: var(--bm-color-surface);
  border: 1px solid rgba(10, 11, 28, 0.05);
  border-radius: var(--bm-radius-sm);
  box-shadow: var(--bm-shadow-soft);
  padding: 0;
}

.bm-entry-content > *:first-child {
  margin-top: 0;
}

.bm-entry-content > *:last-child {
  margin-bottom: 0;
}

.bm-entry-content > .wp-block-group,
.bm-entry-content > .wp-block-columns,
.bm-entry-content > .wp-block-cover,
.bm-entry-content > .wp-block-table,
.bm-entry-content > .wp-block-image,
.bm-entry-content > .wp-block-embed,
.bm-entry-content > .wp-block-code,
.bm-entry-content > .wp-block-preformatted,
.bm-entry-content > .wp-block-html {
  margin-top: var(--bm-space-3);
  margin-bottom: var(--bm-space-3);
}

.bm-entry-content > .wp-block-group:first-child,
.bm-entry-content > .wp-block-columns:first-child {
  margin-top: 0;
}

.bm-entry-content .alignwide {
  width: min(100%, 1200px);
}

.bm-entry-content .alignfull {
  width: 100%;
}

.bm-entry-content .wp-block-code,
.bm-entry-content pre {
  padding: 18px 20px;
  border-radius: var(--bm-radius-sm);
  background: var(--bm-color-navy-strong);
  color: #f7f8fb;
  overflow-x: auto;
}

.bm-entry-content code,
.bm-entry-content kbd,
.bm-entry-content samp {
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

.bm-entry-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bm-color-surface);
}

.bm-entry-content th,
.bm-entry-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bm-color-border);
  text-align: left;
}

.bm-entry-content th {
  color: var(--bm-color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bm-entry-content blockquote {
  margin: 24px 0;
  padding: 0 0 0 20px;
  border-left: 4px solid var(--bm-color-teal);
  color: var(--bm-color-text-muted);
}

.bm-post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--bm-space-3);
}

.bm-post-card {
  padding: var(--bm-space-3);
  background: var(--bm-color-surface);
  border: 1px solid rgba(10, 11, 28, 0.05);
  border-radius: var(--bm-radius-sm);
  box-shadow: var(--bm-shadow-soft);
}

.bm-post-card__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--bm-color-navy-strong);
}

.bm-post-card__meta {
  margin: 0 0 12px;
  color: var(--bm-color-text-muted);
  font-size: 0.875rem;
}

.bm-post-card__link {
  text-decoration: none;
}

.bm-pagination {
  margin-top: var(--bm-space-3);
}

.bm-pagination .nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bm-pagination a,
.bm-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--bm-radius-sm);
  background: var(--bm-color-surface);
  border: 1px solid var(--bm-color-border);
  text-decoration: none;
}

.bm-pagination .current {
  background: var(--bm-color-navy-strong);
  color: #ffffff;
  border-color: var(--bm-color-navy-strong);
}

.bm-menu-toggle {
  display: none;
  appearance: none;
  border: 0;
  border-radius: var(--bm-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bm-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .bm-sidebar {
    transform: translateX(-100%);
    transition: transform var(--bm-transition);
  }

  .bm-shell.is-sidebar-open .bm-sidebar {
    transform: translateX(0);
  }

  .bm-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 11, 28, 0.35);
  }

  .bm-shell.is-sidebar-open .bm-overlay {
    display: block;
  }

  .bm-shell__main {
    margin-left: 0;
  }

  .bm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bm-color-navy);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 80;
  }

  .bm-topbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
  }

  .bm-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 782px) {
  .bm-main {
    padding: 16px;
  }

  .bm-content-card,
  .bm-post-card {
    padding: 20px;
  }

  .bm-entry-content table {
    display: block;
    overflow-x: auto;
  }
}
