:root {
  --bg: #fffdf6;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-2: rgba(255, 255, 255, 0.9);
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.68);
  --border: rgba(11, 18, 32, 0.1);
  --shadow: 0 18px 56px rgba(11, 18, 32, 0.1);
  --accent: #ffd700;
  --accent-soft: rgba(255, 215, 0, 0.18);
  --accent-soft-2: rgba(255, 215, 0, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 76ch;
  --topbar-h: 64px;

  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-head: "Sen", "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(900px 700px at 14% 12%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 700px at 86% 20%, var(--accent-soft-2), transparent 55%),
    radial-gradient(700px 500px at 38% 88%, rgba(0, 0, 0, 0.03), transparent 60%),
    var(--bg);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration-color: rgba(255, 215, 0, 0.55);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: rgba(255, 215, 0, 0.95);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-size: 16px;
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.menu-btn:focus-visible {
  outline: 3px solid rgba(255, 215, 0, 0.35);
  outline-offset: 2px;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 44px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  align-self: start;
}

.nav {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.nav__section {
  padding: 12px 12px 14px;
}

.nav__section + .nav__section {
  border-top: 1px solid var(--border);
}

.nav__section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px 10px;
}

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

.nav__link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav__link:hover {
  background: rgba(255, 215, 0, 0.12);
  color: var(--text);
}

.nav__link[aria-current="page"] {
  color: var(--text);
  border-color: rgba(255, 215, 0, 0.28);
  background: rgba(255, 215, 0, 0.18);
}

.main {
  min-width: 0;
}

.panels {
  position: relative;
}

.panel {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.panel.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  inset: auto;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}

.panel__inner {
  max-width: var(--max);
}

/* ---- Home panel layout ---- */

.panel--home .panel__inner {
  max-width: 100%;
}

.home {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home__header {
  padding: 6px 0 2px;
}

.home__primary {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 255, 255, 0.94));
  padding: 18px 18px 6px;
}

.home__primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.home__primary-aside {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  align-self: start;
}

.home__primary-main {
  min-width: 0;
}

.home__related {
  padding-top: 2px;
}

.home__related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.home__projects {
  min-width: 0;
}

.home :is(#home-original-book, #home-more-books, #home-audio, #home-related-projects) {
  scroll-margin-top: calc(var(--topbar-h) + 18px);
}

.panel--home .divider-component {
  display: none;
}

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

.panel--home .icons-component a {
  width: 40px;
  height: 40px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 999px;
}

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

.panel--home .icons-component {
  gap: 10px;
}

.panel--home .text-component.instance-12.style-1,
.panel--home .text-component.instance-48.style-1,
.panel--home .text-component.instance-30.style-1 {
  position: relative;
}

.panel--home .text-component.instance-12.style-1::after,
.panel--home .text-component.instance-48.style-1::after,
.panel--home .text-component.instance-30.style-1::after {
  content: "";
  display: block;
  height: 2px;
  width: 44px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.95), rgba(255, 215, 0, 0.0));
  margin-top: 10px;
}

@media (max-width: 980px) {
  .home__primary-grid {
    grid-template-columns: 1fr;
  }

  .home__primary-aside {
    position: static;
  }

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

/* ---- Styling for imported irealization.com markup ---- */

.panel__inner :is(h1, h2, h3) {
  font-family: var(--font-head);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.panel__inner h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 10px;
}

.panel__inner h2 {
  font-size: 24px;
  margin: 26px 0 10px;
}

.panel__inner p {
  margin: 0 0 14px;
  color: var(--text);
}

.panel__inner .text-component {
  margin: 0 0 14px;
  color: var(--text);
}

.panel__inner .text-component .p {
  display: block;
  margin: 0 0 12px;
}

.panel__inner img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(11, 18, 32, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.panel__inner .image-component {
  margin: 16px 0;
}

.panel__inner .image-component .frame {
  display: block;
  text-decoration: none;
}

.panel__inner :is(.buttons-component, .icons-component) {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel__inner :is(.buttons-component, .icons-component) a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 18, 32, 0.09);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.panel__inner :is(.buttons-component, .icons-component) a:hover {
  border-color: rgba(255, 215, 0, 0.38);
  background: rgba(255, 215, 0, 0.14);
}

.panel__inner :is(.buttons-component, .icons-component) a:focus-visible {
  outline: 3px solid rgba(255, 215, 0, 0.32);
  outline-offset: 2px;
}

.panel__inner :is(.buttons-component, .icons-component) svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.9;
}

.panel__inner :is(.buttons-component, .icons-component) .label {
  white-space: nowrap;
}

.panel__inner .container-component .wrapper,
.panel__inner .container-component .inner {
  width: 100%;
}

.panel__inner .container-component.columns .inner {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel__inner .container-component.columns .inner > div {
  min-width: 0;
}

.panel__inner .embed-component {
  margin: 18px 0;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    padding: 12px 16px 16px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 99;
  }

  .sidebar[data-open="true"] {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }

  .nav {
    max-height: calc(100dvh - var(--topbar-h) - 28px);
    overflow: auto;
  }

  .panel {
    padding: 20px;
  }

  .panel__inner .container-component.columns .inner {
    grid-template-columns: 1fr;
  }
}
