*,
*::before,
*::after {
  box-sizing: border-box;
}

body.bp-page {
  --bp-ink: #101a2c;
  --bp-text: rgba(16, 26, 44, 0.82);
  --bp-muted: rgba(16, 26, 44, 0.58);
  --bp-line: rgba(16, 26, 44, 0.10);
  --bp-cream: #fff8ec;
  --bp-cream-2: #fffdfa;
  --bp-white: #ffffff;
  --bp-navy: #102944;
  --bp-navy-deep: #0c1b2d;
  --bp-yellow: #ffd23f;
  --bp-yellow-soft: #fff1b8;
  --bp-yellow-dark: #8a6a00;
  --bp-radius: 22px;
  --bp-radius-lg: 28px;
  --bp-shadow: 0 30px 80px -55px rgba(8, 20, 36, 0.30);
  --bp-shadow-soft: 0 18px 45px -35px rgba(10, 22, 40, 0.20);
  --bp-font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --bp-font-body: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bp-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.75), transparent 26%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.45), transparent 24%),
    var(--bp-cream);
  color: var(--bp-ink);
  font-family: var(--bp-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.bp-page a {
  color: inherit;
}

body.bp-page img {
  max-width: 100%;
  display: block;
}

/* ===== HEADER ===== */
.bp-site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0c1b2d 0%, #102944 58%, #0b1626 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px -35px rgba(8, 20, 36, 0.55);
}

.bp-site-nav-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}

.bp-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bp-logo-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

.bp-logo-txt {
  font-family: var(--bp-font-display);
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.bp-logo-accent {
  color: var(--bp-yellow);
}

.bp-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-nav-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--bp-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  transition: color 0.22s ease;
  white-space: nowrap;
}

.bp-nav-links a:hover,
.bp-nav-links a.active {
  color: #fff;
}

.bp-nav-links a.active {
  color: var(--bp-yellow);
}

/* ===== BURGER ===== */
.bp-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background 0.22s ease, border-color 0.22s ease;
  flex: 0 0 auto;
}

.bp-burger:hover,
.bp-burger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 210, 63, 0.35);
  outline: none;
}

.bp-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.18s ease;
  transform-origin: center;
}

.bp-site-nav.bp-open .bp-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.bp-site-nav.bp-open .bp-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.bp-site-nav.bp-open .bp-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== DROPDOWN MOBILE MENU ===== */
.bp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, #0c1b2d 0%, #102944 70%, #0b1626 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  overflow: hidden;
}

.bp-site-nav.bp-open .bp-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.bp-dropdown-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  display: grid;
  gap: 0;
}

.bp-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--bp-font-display);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bp-dropdown-link:last-child {
  border-bottom: 0;
}

.bp-dropdown-link:hover,
.bp-dropdown-link:focus-visible,
.bp-dropdown-link.active {
  color: var(--bp-yellow);
  outline: none;
}

.bp-dropdown-link .idx {
  font-family: var(--bp-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(255, 227, 112, 0.75);
  flex: 0 0 auto;
}

/* ===== PAGE SHELL ===== */
.bp-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.bp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.bp-main {
  min-width: 0;
}

.bp-article {
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius-lg);
  padding: clamp(24px, 4vw, 46px);
  box-shadow: var(--bp-shadow);
  color: var(--bp-ink);
  overflow: hidden;
}

/* ===== BREADCRUMB ===== */
.bp-breadcrumb {
  margin-bottom: 14px;
}

.bp-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--bp-font-body);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bp-muted);
}

.bp-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-breadcrumb li + li::before {
  content: "/";
  color: rgba(16, 26, 44, 0.28);
  font-size: 0.78rem;
  line-height: 1;
}

.bp-breadcrumb a {
  text-decoration: none;
  color: inherit;
}

.bp-breadcrumb a:hover {
  color: var(--bp-ink);
}

.bp-breadcrumb [aria-current="page"] {
  color: rgba(16, 26, 44, 0.72);
}

/* ===== POST HEADER ===== */
.bp-header {
  max-width: 860px;
  margin-bottom: 30px;
}

.bp-title {
  font-family: var(--bp-font-display);
  font-size: clamp(2.05rem, 5vw, 3.45rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  color: var(--bp-ink);
}

.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-family: var(--bp-font-mono);
  font-size: 0.76rem;
  color: var(--bp-muted);
}

.bp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bp-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 26, 44, 0.22);
  flex: 0 0 auto;
}

/* ===== POST BODY ===== */
.bp-body p {
  margin: 0 0 18px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--bp-text);
}

.bp-body h2 {
  font-family: var(--bp-font-display);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 38px 0 14px;
  color: var(--bp-ink);
}

.bp-body h3 {
  font-family: var(--bp-font-display);
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 28px 0 10px;
  color: var(--bp-ink);
}

.bp-body ul,
.bp-body ol {
  margin: 0 0 20px;
  padding-left: 1.25rem;
  color: var(--bp-text);
  line-height: 1.75;
}

.bp-body li {
  margin-bottom: 8px;
}

.bp-body a {
  color: var(--bp-ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 210, 63, 0.65);
  text-underline-offset: 3px;
}

.bp-body a:hover {
  text-decoration-color: var(--bp-yellow);
}

.bp-quick-answer {
  background: var(--bp-cream);
  border: 1px solid rgba(255, 210, 63, 0.45);
  border-left: 5px solid var(--bp-yellow);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--bp-text);
}

.bp-quick-answer strong {
  color: var(--bp-ink);
}

.bp-checklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.bp-checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  color: var(--bp-text);
  line-height: 1.6;
}

.bp-check-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--bp-yellow-dark);
}

.bp-table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
  border-radius: 18px;
  border: 1px solid var(--bp-line);
  background: var(--bp-white);
}

.bp-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.bp-table th,
.bp-table td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--bp-line);
  text-align: left;
  vertical-align: top;
  color: var(--bp-text);
}

.bp-table th {
  background: var(--bp-cream-2);
  font-family: var(--bp-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(16, 26, 44, 0.68);
  font-weight: 600;
}

.bp-table tr:last-child td {
  border-bottom: 0;
}

.bp-timeline {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.bp-timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--bp-line);
  border-radius: 18px;
  background: var(--bp-cream-2);
}

.bp-time {
  font-family: var(--bp-font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-yellow-dark);
  line-height: 1.35;
}

.bp-timeline-item p {
  margin: 0;
}

.bp-pullquote {
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--bp-navy);
  color: #fff;
  font-family: var(--bp-font-display);
  font-size: 1.18rem;
  line-height: 1.45;
  position: relative;
  overflow: hidden;
}

.bp-pullquote p {
  margin: 0;
  color: #fff;
}

.bp-pullquote::before {
  content: "“";
  position: absolute;
  right: 18px;
  top: 4px;
  font-size: 5rem;
  line-height: 1;
  color: rgba(255, 210, 63, 0.18);
  font-family: Georgia, serif;
}

/* ===== SIDEBAR ===== */
.bp-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.bp-widget {
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
  padding: 22px;
  box-shadow: var(--bp-shadow-soft);
}

.bp-widget h3 {
  font-family: var(--bp-font-display);
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--bp-ink);
}

.bp-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: bpRecent;
}

.bp-recent-list li {
  counter-increment: bpRecent;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bp-line);
}

.bp-recent-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bp-recent-list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  text-decoration: none;
  color: var(--bp-text);
  line-height: 1.45;
  font-size: 0.94rem;
}

.bp-recent-list a::before {
  content: counter(bpRecent, decimal-leading-zero);
  font-family: var(--bp-font-mono);
  font-size: 0.72rem;
  color: var(--bp-yellow-dark);
  line-height: 1.55;
}

.bp-recent-list a:hover {
  color: var(--bp-ink);
}

.bp-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.bp-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--bp-text);
  font-size: 0.94rem;
  line-height: 1.45;
  padding: 11px 12px;
  border: 1px solid var(--bp-line);
  border-radius: 14px;
  background: var(--bp-cream-2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.bp-category-list a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 210, 63, 0.55);
  background: #fff;
  color: var(--bp-ink);
}

.bp-category-arrow {
  font-family: var(--bp-font-mono);
  font-size: 0.82rem;
  color: var(--bp-yellow-dark);
  flex: 0 0 auto;
}

/* ===== RELATED POSTS ===== */
.bp-related {
  margin-top: 34px;
}

.bp-related-head {
  margin-bottom: 18px;
}

.bp-related-head h2 {
  font-family: var(--bp-font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--bp-ink);
}

.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bp-related-card {
  position: relative;
  background: var(--bp-white);
  border: 1px solid var(--bp-line);
  border-radius: var(--bp-radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 12px;
  align-content: start;
  box-shadow: var(--bp-shadow-soft);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  overflow: hidden;
}

.bp-related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 210, 63, 0.55);
  box-shadow: 0 28px 70px -45px rgba(8, 20, 36, 0.32);
}

.bp-related-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffe370, #e0ab10);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.bp-related-card:hover::after {
  transform: scaleX(1);
}

.bp-related-title {
  font-family: var(--bp-font-display);
  font-size: 1.18rem;
  line-height: 1.28;
  margin: 0;
  color: var(--bp-ink);
}

.bp-related-excerpt {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--bp-text);
}

/* ===== FOOTER ===== */
.bp-footer {
  background: linear-gradient(135deg, #0c1b2d 0%, #102944 58%, #0b1626 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  padding: 22px 0;
}

.bp-footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--bp-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.bp-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  flex-wrap: wrap;
}

.bp-footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1040px) {
  .bp-layout {
    grid-template-columns: 1fr;
  }

  .bp-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bp-nav-links {
    display: none;
  }

  .bp-burger {
    display: inline-flex;
  }

  .bp-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  .bp-dropdown {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .bp-site-nav-inner {
    min-height: 64px;
  }

  .bp-shell {
    padding: 20px 0 34px;
  }

  .bp-breadcrumb ol,
  .bp-breadcrumb li + li::before {
    font-size: 0.72rem;
  }

  .bp-related-grid {
    grid-template-columns: 1fr;
  }

  .bp-timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bp-meta {
    font-size: 0.72rem;
  }

  .bp-article {
    padding: 22px;
    border-radius: 22px;
  }

  .bp-widget {
    padding: 18px;
    border-radius: 20px;
  }

  .bp-footer-inner {
    justify-content: flex-start;
  }

  .bp-dropdown-inner {
    padding: 10px 0 16px;
  }

  .bp-dropdown-link {
    min-height: 52px;
    font-size: 1.02rem;
  }
}