:root {
  --bg: #070a10;
  --panel: rgba(22, 27, 35, 0.72);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.74);
  --accent: #ff2a2a;
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.48);
  --shadow-md: 0 16px 44px rgba(0, 0, 0, 0.34);
  --radius-shell: 24px;
  --radius-card: 20px;
  --sidebar: 344px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 600px at 10% 15%, rgba(255, 42, 42, 0.18), transparent 60%),
    radial-gradient(900px 700px at 85% 45%, rgba(255, 255, 255, 0.08), transparent 60%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 560px at 14% 34%, rgba(255, 42, 42, 0.2), transparent 60%),
    radial-gradient(680px 680px at 84% 54%, rgba(255, 255, 255, 0.05), transparent 65%);
  mix-blend-mode: screen;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.skipLink {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 1100;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.skipLink:focus {
  left: 12px;
}

.bg-glow {
  position: fixed;
  width: 720px;
  height: 720px;
  z-index: 0;
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(92px) saturate(1.15);
  will-change: transform;
}

.glow-1 {
  top: -240px;
  left: -280px;
  background: radial-gradient(circle, rgba(255, 42, 42, 0.95), transparent 60%);
}

.glow-2 {
  right: -320px;
  bottom: -320px;
  opacity: 0.28;
  filter: blur(110px) saturate(1.05);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 60%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 0 88px;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar)) minmax(0, 1fr);
  width: 100%;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius-shell);
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 26px;
  background: rgba(255, 255, 255, 0.035);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.avatarWrap {
  display: grid;
  place-items: center;
  padding-top: 6px;
}

.avatar {
  width: 148px;
  height: 148px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sideTitle {
  margin-top: 8px;
  text-align: center;
}

.sideTitle h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.sideTitle p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.iconBtn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.iconBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.iconBtn svg {
  width: 18px;
  height: 18px;
}

.sideFoot {
  margin-top: auto;
  padding: 20px 0 8px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.02em;
}

.footDot {
  margin: 0 6px;
  opacity: 0.65;
}

#siteVersion {
  font-variant-numeric: tabular-nums;
}

.main {
  min-width: 0;
  padding: 34px 34px 32px;
}

.hero {
  padding: 6px 0 28px;
  text-align: center;
}

.hero h2 {
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.03em;
}

.sub {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.micro {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  padding: 26px 0;
  scroll-margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section:first-of-type {
  border-top: 0;
}

.section h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.section p {
  max-width: 78ch;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.lead {
  color: var(--text);
  font-weight: 700;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 16px;
  align-items: stretch;
}

.card {
  height: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.card p {
  line-height: 1.68;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(255, 42, 42, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.58;
}

.list i[data-lucide="check"],
.list svg.lucide.lucide-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.projects {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.projTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.projTop h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.tag {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.case {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.caseLead {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.caseText {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.caseBlock {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.caseKicker {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.caseList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.caseList li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  line-height: 1.56;
  color: var(--muted);
}

.caseList i[data-lucide="check"],
.caseList svg.lucide.lucide-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.contactLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.contactLink:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.contactLink svg {
  width: 16px;
  height: 16px;
}

.contactLink span {
  font-weight: 900;
}

.popupSource {
  display: none;
}

.rail {
  display: flex;
  gap: 10px;
}

nav.railDesktop {
  position: absolute;
  top: 50%;
  right: -204px;
  z-index: 40;
  flex-direction: column;
  align-items: stretch;
  width: 184px;
  padding: 18px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(19, 23, 31, 0.92), rgba(9, 12, 18, 0.82));
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: translateY(-50%);
}

nav.railDesktop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -44px;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.02));
  transform: translateY(-50%);
}

nav.railDesktop::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -54px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96), rgba(255, 42, 42, 0.64));
  box-shadow: 0 0 22px rgba(255, 42, 42, 0.34);
  transform: translateY(-50%);
}

.railTooltip {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 4px 6px;
}

.railTooltip .t {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

nav.railMobile {
  display: none;
}

.railBtn {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.railBtn:hover {
  transform: translateX(-3px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.railBtn.active,
.railBtn[aria-current="location"] {
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.16), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 42, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.railIcon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.railBtn:hover .railIcon,
.railBtn.active .railIcon,
.railBtn[aria-current="location"] .railIcon {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.2), rgba(255, 255, 255, 0.08));
  transform: translateY(-1px);
}

.railBtn svg {
  width: 18px;
  height: 18px;
}

.railText {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.railIndex {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.railLabel {
  display: inline;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.18s ease, visibility 0s linear 0s;
}

.modalBackdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 50% 12%, rgba(255, 42, 42, 0.12), transparent 62%),
    rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modalPanel {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(20, 24, 33, 0.95), rgba(10, 13, 19, 0.92));
  backdrop-filter: blur(20px) saturate(138%);
  -webkit-backdrop-filter: blur(20px) saturate(138%);
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.modal[aria-hidden="false"] .modalPanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modalClose {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.modalClose:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.modalMeta {
  padding-right: 60px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modalEyebrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.modalTitle {
  margin: 10px 0 0;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.modalBody {
  display: grid;
  gap: 22px;
}

.modalBody .section {
  padding-top: 0;
  border-top: 0;
}

.modalBody > .section > p:first-of-type {
  margin-top: -6px;
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.76);
}

.modalBody .section p {
  max-width: none;
}

.modalBody .projects {
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1050;
  max-width: calc(100% - 32px);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toastEm {
  font-size: 1.12em;
  font-weight: 950;
}

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

.bjornBotRoot {
  position: relative;
  z-index: 1040;
}

.bjornBotToggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1041;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.96), rgba(12, 16, 22, 0.94));
  color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(255, 42, 42, 0.06);
  backdrop-filter: blur(18px) saturate(132%);
  -webkit-backdrop-filter: blur(18px) saturate(132%);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.bjornBotToggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(28, 32, 40, 0.98), rgba(14, 18, 24, 0.96));
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 42, 42, 0.1);
}

.bjornBotToggle[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(39, 22, 24, 0.98), rgba(14, 18, 24, 0.96));
}

.bjornBotToggleIcon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.22), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.bjornBotToggleIcon svg {
  width: 20px;
  height: 20px;
}

.bjornBotToggleText {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.bjornBotToggleKicker {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bjornBotToggleLabel {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.bjornBot {
  position: fixed;
  inset: 0;
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.bjornBot[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.18s ease, visibility 0s linear 0s;
}

.bjornBotBackdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.bjornBotPanel {
  position: absolute;
  right: 24px;
  bottom: 92px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 14px;
  width: min(468px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 124px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background:
    radial-gradient(420px 260px at 84% 0%, rgba(255, 42, 42, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(19, 23, 31, 0.98), rgba(9, 12, 18, 0.96));
  box-shadow:
    0 34px 94px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(138%);
  -webkit-backdrop-filter: blur(20px) saturate(138%);
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  overflow: hidden;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.bjornBot[aria-hidden="false"] .bjornBotPanel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.bjornBotHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bjornBotMeta {
  min-width: 0;
}

.bjornBotEyebrow {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bjornBotTitle {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.bjornBotIntro {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.58;
}

.bjornBotClose {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.bjornBotClose:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.bjornBotQuick {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  max-height: 48px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  padding-right: 4px;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.bjornBotQuick::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.bjornBotQuick::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  background-clip: padding-box;
}

.bjornBotQuickMeta {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-right: 4px;
}

.bjornBotQuickBtn,
.bjornBotFollowup,
.bjornBotSource {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.bjornBotQuickBtn:hover,
.bjornBotFollowup:hover,
.bjornBotSource:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.bjornBotQuickBtn:disabled,
.bjornBotFollowup:disabled,
.bjornBotSource:disabled,
.bjornBotFeedbackBtn:disabled,
.bjornBotSend:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.bjornBotMessages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bjornBotMessages::-webkit-scrollbar {
  width: 9px;
}

.bjornBotMessages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  background-clip: padding-box;
}

.bjornBotMessage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.bjornBotMessage.isUser {
  align-items: flex-end;
}

.bjornBotMessage.isBot {
  align-items: flex-start;
}

.bjornBotMessage.isTyping .bjornBotBubble {
  min-width: 78px;
}

.bjornBotRole {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bjornBotBubble {
  max-width: min(96%, 520px);
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  line-height: 1.62;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bjornBotMessage.isBot .bjornBotBubble {
  background: rgba(255, 255, 255, 0.045);
  border-bottom-left-radius: 8px;
}

.bjornBotMessage.isUser .bjornBotBubble {
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.2), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.12);
  border-bottom-right-radius: 8px;
}

.bjornBotBubble p {
  margin: 0;
}

.bjornBotBubble p + p {
  margin-top: 10px;
}

.bjornBotActions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.bjornBotActionsLabel {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bjornBotActionRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bjornBotFeedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bjornBotFeedbackRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bjornBotFeedbackBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.bjornBotFeedbackBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.bjornBotFeedbackBtn.isSelected {
  border-color: rgba(255, 42, 42, 0.28);
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.22), rgba(255, 255, 255, 0.06));
}

.bjornBotFeedbackStatus {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.45;
}

.bjornBotTyping {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bjornBotTypingDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  animation: botTypingPulse 1.2s ease-in-out infinite;
}

.bjornBotTypingDot:nth-child(2) {
  animation-delay: 0.16s;
}

.bjornBotTypingDot:nth-child(3) {
  animation-delay: 0.32s;
}

.bjornBotComposer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 0;
}

.bjornBotInput {
  width: 100%;
  min-height: 50px;
  max-height: 144px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.5;
  resize: none;
  overflow: auto;
}

.bjornBotInput::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.bjornBotSend {
  min-width: 96px;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.24), rgba(255, 255, 255, 0.08));
  color: rgba(255, 255, 255, 0.96);
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.bjornBotSend:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.3), rgba(255, 255, 255, 0.1));
}

.bjornBotLimit {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.5;
}

body.isBotOpen .bjornBotToggle,
body.isBotOpen .railMobile {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.botHighlight {
  border-color: rgba(255, 42, 42, 0.22) !important;
  box-shadow:
    0 0 0 1px rgba(255, 42, 42, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.28) !important;
}

@keyframes botTypingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.u-mt18 {
  margin-top: 18px;
}

.u-stack6 {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.u-mutedBody {
  opacity: 0.92;
  line-height: 1.58;
}

@media (max-width: 1080px) {
  :root {
    --sidebar: 316px;
  }

  .hero h2 {
    font-size: 40px;
  }
}

@media (min-width: 901px) {
  .main {
    padding-right: 88px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  nav.railDesktop {
    right: -172px;
  }
}

@media (min-width: 901px) and (max-width: 1040px) {
  nav.railDesktop {
    right: -150px;
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .stage {
    padding: 18px 0 112px;
  }

  .container {
    width: min(100%, calc(100% - 24px));
  }

  .shell {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .side {
    padding: 24px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main {
    padding: 24px 20px 30px;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  nav.railDesktop {
    display: none !important;
  }

  .railTooltip {
    display: none;
  }

  nav.railMobile {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(15, 18, 24, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(255, 42, 42, 0.05);
  }

  nav.railMobile .railBtn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 56px;
    justify-content: center;
    grid-template-columns: 1fr;
    border-radius: 16px;
    gap: 4px;
    padding: 8px 0 6px;
  }

  nav.railMobile .railIcon {
    width: auto;
    height: auto;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  nav.railMobile .railBtn svg {
    width: 19px;
    height: 19px;
  }

  nav.railMobile .railText {
    align-items: center;
    gap: 3px;
    text-align: center;
  }

  nav.railMobile .railIndex {
    display: none;
  }

  nav.railMobile .railLabel {
    display: block;
    font-size: 10px;
  }

  .modalPanel {
    width: min(100vw - 20px, 900px);
    max-height: calc(100vh - 20px);
    padding: 22px 18px 18px;
  }

  .modalMeta {
    margin-bottom: 16px;
    padding-right: 50px;
    padding-bottom: 14px;
  }

  .modalTitle {
    font-size: 24px;
  }

  .toast {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .bjornBotToggle {
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    padding-right: 14px;
  }

  .bjornBotBackdrop {
    background:
      radial-gradient(720px 360px at 50% 100%, rgba(255, 42, 42, 0.08), transparent 70%),
      rgba(6, 8, 12, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .bjornBotPanel {
    left: 8px;
    right: 8px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(82dvh, calc(100dvh - 18px - env(safe-area-inset-bottom, 0px)));
    padding: 18px;
    border-radius: 26px;
  }

  .bjornBotTitle {
    font-size: 24px;
  }

  .bjornBotQuick {
    gap: 8px;
    max-height: 44px;
  }

  .bjornBotQuickBtn,
  .bjornBotFollowup,
  .bjornBotSource,
  .bjornBotFeedbackBtn {
    font-size: 12px;
  }

  .bjornBotMessages {
    min-height: 0;
  }

  .bjornBotSend {
    width: auto;
  }
}

@media (max-width: 720px) {
  .hero h2 {
    font-size: 34px;
  }

  .sideTitle h1 {
    font-size: 28px;
  }

  .caseGrid {
    grid-template-columns: 1fr;
  }

  .bjornBotToggleText {
    max-width: 164px;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 16px);
  }

  .shell {
    border-radius: 20px;
  }

  .avatar {
    width: 132px;
    height: 132px;
  }

  .main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bjornBotToggle {
    gap: 10px;
    padding: 11px 12px;
  }

  .bjornBotToggleIcon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .bjornBotToggleKicker {
    font-size: 9px;
  }

  .bjornBotToggleLabel {
    font-size: 14px;
  }

  .bjornBotPanel {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 16px;
    max-height: min(84dvh, calc(100dvh - 16px - env(safe-area-inset-bottom, 0px)));
  }

  .bjornBotHeader {
    gap: 12px;
  }

  .bjornBotBubble {
    max-width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modal,
  .modalPanel {
    transition: none !important;
  }
}
