/* =========================================================
   PORTFOLIO SHELL REVISION
   Navigation, right rail, theme switch, and star field
========================================================= */

:root {
  --shell-gold: #ebb020;
  --shell-panel: #343539;
  --shell-panel-deep: #292a2e;
  --shell-border: rgba(255, 255, 255, .075);
  --shell-muted: #a7a8ac;
  --desktop-shell-gap: clamp(24px, 4vh, 48px);
}

/* The old floating squares are replaced by the canvas star field. */
.area {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.area .circles {
  display: none !important;
}

.star-field-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .92;
  pointer-events: none;
  transition: opacity .35s ease;
}

html[data-theme="light"] .star-field-canvas {
  opacity: 0;
}

#main,
.left-side,
.right-side,
.menu-toggle,
#color-switcher,
.global-chatbot {
  isolation: isolate;
}

/* =========================================================
   LEFT NAVIGATION - DESKTOP
========================================================= */

@media (min-width: 992px) {
  /* Give the left rail, content viewport, and right rail more vertical room. */
  #main,
  .left-side,
  .right-side {
    top: var(--desktop-shell-gap) !important;
    bottom: var(--desktop-shell-gap) !important;
    height: auto !important;
  }

  body.blog-single-page #main {
    top: var(--desktop-shell-gap) !important;
    bottom: var(--desktop-shell-gap) !important;
    height: auto !important;
  }

  .left-side {
    overflow: hidden !important;
    border: 1px solid var(--shell-border) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.025), transparent 28%),
      var(--shell-panel) !important;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .18) !important;
  }

  .left-side::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(235,176,32,.6), transparent);
    pointer-events: none;
  }

  body.layout-collapsed .left-side,
  body.blog-single-page .left-side {
    width: 80px !important;
    padding: 12px 6px 10px !important;
  }

  body.layout-collapsed .left-side .menu-content-align,
  body.blog-single-page .left-side .menu-content-align {
    margin: 0 !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  body.layout-collapsed .left-side img,
  body.blog-single-page .left-side img {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 7px 18px rgba(0,0,0,.22);
  }

  body.layout-collapsed .left-side .menu-profile-name,
  body.blog-single-page .left-side .menu-profile-name {
    margin: 4px 0 0 !important;
    padding: 0 !important;
    color: #fff;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
  }

  body.layout-collapsed .left-side .menu-align,
  body.blog-single-page .left-side .menu-align {
    position: absolute !important;
    top: 108px !important;
    right: 6px !important;
    bottom: 10px !important;
    left: 6px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }

  body.layout-collapsed .left-side .menu,
  body.blog-single-page .left-side .menu {
    position: relative !important;
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: space-evenly !important;
    gap: 2px !important;
  }

  body.layout-collapsed .left-side .menu .list-group-item,
  body.blog-single-page .left-side .menu .list-group-item {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    flex: 0 1 58px !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.layout-collapsed .left-side .menu a,
  body.blog-single-page .left-side .menu a {
    position: relative;
    display: flex !important;
    width: 100%;
    height: 100%;
    min-height: 48px;
    padding: 5px 2px !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #c3c4c7;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
  }

  body.layout-collapsed .left-side .menu a::before,
  body.blog-single-page .left-side .menu a::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: -7px;
    width: 2px;
    border-radius: 999px;
    background: var(--shell-gold);
    opacity: 0;
    transform: scaleY(.4);
    transition: opacity .2s ease, transform .2s ease;
  }

  body.layout-collapsed .left-side .menu a:hover,
  body.layout-collapsed .left-side .menu a:focus-visible,
  body.layout-collapsed .left-side .menu a.active,
  body.blog-single-page .left-side .menu a:hover,
  body.blog-single-page .left-side .menu a:focus-visible,
  body.blog-single-page .left-side .menu a.active {
    color: #fff !important;
    border-color: rgba(235,176,32,.14);
    background: linear-gradient(135deg, rgba(235,176,32,.13), rgba(235,176,32,.035));
    transform: translateY(-1px);
  }

  body.layout-collapsed .left-side .menu a.active::before,
  body.blog-single-page .left-side .menu a.active::before {
    opacity: 1;
    transform: scaleY(1);
  }

  body.layout-collapsed .left-side .menu a i,
  body.blog-single-page .left-side .menu a i {
    margin: 0 !important;
    color: var(--shell-gold);
    font-size: 17px !important;
    line-height: 1;
    transform: none !important;
  }

  body.layout-collapsed .left-side .menu a span,
  body.blog-single-page .left-side .menu a span {
    color: inherit !important;
    font-size: 11px;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.layout-collapsed .left-side .menu-footer,
  body.blog-single-page .left-side .menu-footer {
    display: none !important;
  }

  /* Expanded profile menu used on the home and contact sections. */
  body.layout-expanded .left-side {
    width: 300px !important;
    padding: 28px 18px 18px !important;
  }

  body.layout-expanded .left-side .menu-content-align {
    margin: 0 !important;
  }

  body.layout-expanded .left-side img {
    width: 132px !important;
    height: 132px !important;
    object-fit: cover;
    border: 5px solid #f7f7f8;
    box-shadow: 0 13px 28px rgba(0,0,0,.2);
  }

  body.layout-expanded .left-side .menu-profile-name {
    margin: 7px 0 9px !important;
    padding: 0 !important;
    color: #fff;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: .8px;
  }

  body.layout-expanded .left-side a.download-cv {
    padding: 9px 24px !important;
    border-radius: 999px;
    font-size: 13px !important;
  }

  body.layout-expanded .left-side .menu-align {
    position: absolute !important;
    right: 14px !important;
    bottom: 15px !important;
    left: 14px !important;
    width: auto !important;
    height: 152px !important;
    transform: none !important;
  }

  body.layout-expanded .left-side .menu {
    position: relative !important;
    display: grid !important;
    width: 100% !important;
    height: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
  }

  body.layout-expanded .left-side .menu .list-group-item {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.layout-expanded .left-side .menu a {
    display: flex !important;
    width: 100%;
    height: 100%;
    padding: 7px 4px !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #c6c7ca;
  }

  body.layout-expanded .left-side .menu a:hover,
  body.layout-expanded .left-side .menu a:focus-visible,
  body.layout-expanded .left-side .menu a.active {
    color: #fff !important;
    border-color: rgba(235,176,32,.15);
    background: linear-gradient(135deg, rgba(235,176,32,.13), rgba(235,176,32,.035));
  }

  body.layout-expanded .left-side .menu a i {
    margin: 0 !important;
    color: var(--shell-gold);
    font-size: 18px !important;
    line-height: 1;
    transform: none !important;
  }

  body.layout-expanded .left-side .menu a span {
    color: inherit !important;
    font-size: 11px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.layout-expanded .left-side .menu-footer {
    display: none !important;
  }
}

/* =========================================================
   BLOG ARTICLE SHELL + RIGHT RAIL
========================================================= */

@media (min-width: 992px) {
  body.blog-single-page #main {
    top: 10% !important;
    right: calc(5% + 100px) !important;
    left: calc(5% + 100px) !important;
    width: auto !important;
    height: 80% !important;
  }

  .right-side {
    border: 1px solid var(--shell-border);
    background:
      linear-gradient(180deg, rgba(255,255,255,.025), transparent 30%),
      var(--shell-panel) !important;
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
  }

  .right-side .sidebar-line {
    width: 1px !important;
    background: linear-gradient(to bottom, transparent, var(--shell-gold) 12%, var(--shell-gold) 88%, transparent) !important;
    box-shadow: 0 0 8px rgba(235,176,32,.2) !important;
  }

  .right-side .social-box .social a {
    border-radius: 10px !important;
  }
}

/* The teaser stays compact and horizontal on every page. */
.global-chatbot .chatbot-teaser {
  display: flex !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 120px) !important;
  min-height: 36px !important;
  padding: 7px 11px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.global-chatbot .chatbot-teaser-avatar {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.global-chatbot .chatbot-teaser #chatbotTeaserText {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  overflow: hidden;
  white-space: nowrap !important;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1 !important;
}

/* =========================================================
   THEME SWITCH - VISIBLE STARS LEFT / CLOUDS RIGHT
========================================================= */

#color-switcher.direct-theme-switcher {
  top: 14px !important;
  right: 18px !important;
}

#color-switcher.direct-theme-switcher .theme-mode-switch {
  width: 76px !important;
  height: 34px !important;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.22)) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-track {
  border-color: rgba(255,255,255,.17) !important;
  background: linear-gradient(135deg, #0c101a, #252a38) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-thumb {
  top: 3px !important;
  left: 3px !important;
  width: 28px !important;
  height: 28px !important;
  transform: translateX(42px) rotate(360deg) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-stars {
  position: absolute;
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 7px !important;
  width: 31px;
  opacity: 1;
  transform: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.95) 0 1px, transparent 1.7px),
    radial-gradient(circle at 70% 21%, rgba(235,176,32,.95) 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 48% 66%, rgba(255,255,255,.78) 0 1px, transparent 1.7px),
    radial-gradient(circle at 84% 76%, rgba(255,255,255,.58) 0 .8px, transparent 1.5px);
}

#color-switcher.direct-theme-switcher .theme-mode-stars::after {
  content: "✦";
  position: absolute;
  top: 8px;
  left: 10px;
  color: rgba(235,176,32,.8);
  font-size: 7px;
  line-height: 1;
  animation: switchStarTwinkle 2.2s ease-in-out infinite;
}

#color-switcher.direct-theme-switcher .theme-mode-cloud {
  right: 8px !important;
  bottom: 6px !important;
  left: auto !important;
  width: 27px !important;
  background: rgba(255,255,255,.82) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-switch.is-light .theme-mode-track {
  border-color: rgba(206,151,12,.32) !important;
  background: linear-gradient(135deg, #8fd5ff, #fff0aa) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-switch.is-light .theme-mode-thumb {
  transform: translateX(0) rotate(0) !important;
}

#color-switcher.direct-theme-switcher .theme-mode-switch.is-light .theme-mode-cloud {
  opacity: .88 !important;
  transform: translateX(0) !important;
}

@keyframes switchStarTwinkle {
  0%, 100% { opacity: .45; transform: scale(.75) rotate(0); }
  50% { opacity: 1; transform: scale(1.15) rotate(25deg); }
}

/* =========================================================
   ARTICLE LIGHT MODE
========================================================= */

html[data-theme="light"] body.blog-single-page {
  --shell-panel: #fff;
  --shell-border: rgba(31,35,43,.09);
  background: #e9ebf0 !important;
}

html[data-theme="light"] body.data-article-page {
  --card: #f4f5f7;
  --border: rgba(31,35,43,.1);
  --text: #5d626b;
}

html[data-theme="light"] body.website-article-page {
  --web-bg: #fff;
  --web-card: #f4f5f7;
  --web-card-2: #eef0f3;
  --web-border: rgba(31,35,43,.1);
  --web-muted: #676c75;
}

html[data-theme="light"] body.blog-single-page #blog-single {
  background: #fff !important;
  color: #555b64 !important;
}

html[data-theme="light"] body.blog-single-page #blog-single h1,
html[data-theme="light"] body.blog-single-page #blog-single h2,
html[data-theme="light"] body.blog-single-page #blog-single h3,
html[data-theme="light"] body.blog-single-page #blog-single h4,
html[data-theme="light"] body.blog-single-page #blog-single h5,
html[data-theme="light"] body.blog-single-page #blog-single h6,
html[data-theme="light"] body.blog-single-page #blog-single strong {
  color: #25282e;
}

html[data-theme="light"] body.blog-single-page #blog-single p,
html[data-theme="light"] body.blog-single-page #blog-single li,
html[data-theme="light"] body.blog-single-page #blog-single blockquote {
  color: #60656e;
}

html[data-theme="light"] .website-stat,
html[data-theme="light"] .website-final-formula > div,
html[data-theme="light"] .conclusion-icon {
  background: #f4f5f7 !important;
  border-color: rgba(31,35,43,.1) !important;
}

html[data-theme="light"] .website-visual-label {
  background: rgba(255,255,255,.96) !important;
  color: #454a52 !important;
  box-shadow: 0 10px 30px rgba(39,42,49,.1) !important;
}

html[data-theme="light"] .left-side,
html[data-theme="light"] .right-side {
  background: linear-gradient(180deg, rgba(235,176,32,.025), transparent 28%), #fff !important;
}

html[data-theme="light"] .left-side::before {
  background: linear-gradient(90deg, transparent, rgba(198,141,2,.38), transparent);
}

/* =========================================================
   MOBILE DRAWER
========================================================= */

@media (max-width: 991px) {
  #color-switcher.direct-theme-switcher {
    top: 20px !important;
    right: 72px !important;
  }

  .left-side {
    position: fixed !important;
    top: 10px !important;
    bottom: 10px !important;
    left: 10px !important;
    width: min(330px, calc(100vw - 20px)) !important;
    height: auto !important;
    padding: 0 16px 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 22px !important;
    background: rgba(47,48,53,.985) !important;
    box-shadow: 0 26px 70px rgba(0,0,0,.42) !important;
    transform: translateX(calc(-100% - 28px)) !important;
    transition: transform .34s cubic-bezier(.2,.8,.2,1) !important;
  }

  body.mobile-menu-open .left-side,
  .left-side.nav-open {
    transform: translateX(0) !important;
  }

  .mobile-menu-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex !important;
    min-height: 58px;
    margin: 0 -4px 12px;
    padding: 0 4px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(47,48,53,.985);
  }

  .mobile-menu-drawer-header span {
    color: var(--shell-gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
  }

  .mobile-menu-close {
    width: 34px;
    height: 34px;
    display: grid;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(235,176,32,.3);
    border-radius: 10px;
    color: var(--shell-gold);
    background: rgba(235,176,32,.06);
  }

  .left-side .menu-content-align {
    display: grid !important;
    margin: 0 0 15px !important;
    padding: 14px !important;
    grid-template-columns: 78px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 17px;
    background: rgba(255,255,255,.025);
  }

  .left-side .left-side-image {
    grid-row: 1 / 3;
  }

  .left-side .left-side-image img {
    width: 78px !important;
    height: 78px !important;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.2);
  }

  .left-side .menu-profile-name {
    align-self: end !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 18px !important;
    letter-spacing: .8px;
    text-align: left !important;
    text-transform: uppercase;
  }

  .left-side .menu-content-align .container {
    align-self: start;
    width: 100%;
    margin: 2px 0 0;
    padding: 0;
  }

  .left-side .menu-content-align .container p {
    color: #a8a9ad !important;
    font-size: 11px;
    text-align: left;
  }

  .left-side .menu-align {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
  }

  .left-side .menu {
    position: relative !important;
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .left-side .menu .list-group-item {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .left-side .menu a {
    display: flex !important;
    min-height: 64px;
    padding: 9px 12px !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 13px;
    color: #d3d4d6 !important;
    background: rgba(255,255,255,.02);
  }

  .left-side .menu a:hover,
  .left-side .menu a:focus-visible,
  .left-side .menu a.active {
    border-color: rgba(235,176,32,.25);
    color: #fff !important;
    background: linear-gradient(135deg, rgba(235,176,32,.14), rgba(235,176,32,.035));
  }

  .left-side .menu a i {
    width: 24px;
    margin: 0 !important;
    color: var(--shell-gold);
    font-size: 19px !important;
    line-height: 1;
    transform: none !important;
  }

  .left-side .menu a span {
    color: inherit !important;
    font-size: 12px;
    font-weight: 600;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .left-side .menu-footer {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin-top: 12px;
    padding-top: 12px;
    transform: none !important;
    border-top: 1px solid rgba(255,255,255,.06);
  }

  .left-side .menu-footer .download-cv {
    margin: 0 0 10px !important;
    padding: 9px 20px !important;
    border-radius: 999px;
    font-size: 12px;
  }

  .global-chatbot .chatbot-teaser {
    max-width: calc(100vw - 102px) !important;
    font-size: 11px !important;
  }
}

@media (max-width: 420px) {
  .left-side {
    width: calc(100vw - 16px) !important;
    top: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
  }

  .left-side .menu-content-align {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .left-side .left-side-image img {
    width: 68px !important;
    height: 68px !important;
  }
}

/* =========================================================
   WEB PROJECT LIVE PREVIEWS
========================================================= */

#portfolio .project-live-preview {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  opacity: 0;
  background: #15161a;
  transform: scale(1.018);
  transform-origin: center;
  pointer-events: none;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}

#portfolio .is-live-preview-loading .project-live-preview {
  opacity: .12;
}

#portfolio .is-live-preview-ready .project-live-preview {
  opacity: 1;
  transform: scale(1);
}

#portfolio .project-live-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 68%, rgba(8,9,12,.24));
  pointer-events: none;
}

#portfolio .project-live-preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  border: 0;
  background: #15161a;
  transform: scale(.25);
  transform-origin: top left;
  pointer-events: none;
}

#portfolio .project-live-preview-badge {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  display: inline-flex;
  padding: 5px 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #f7f7f8;
  background: rgba(15,16,19,.76);
  box-shadow: 0 7px 20px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .75px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s ease .15s, transform .3s ease .15s;
}

#portfolio .is-live-preview-ready .project-live-preview-badge {
  opacity: 1;
  transform: translateY(0);
}

#portfolio .project-live-preview-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #72e38d;
  box-shadow: 0 0 8px rgba(114,227,141,.75);
}

#portfolio .portfolio-v2-card:hover .is-live-preview-ready .project-live-preview {
  transform: scale(1.018);
}

/* Fallback artwork shown briefly while each live page loads. */
#portfolio .project-art-forma {
  --art-accent: #d9b477;
  --art-accent-2: #8ea49b;
  --art-bg-1: #23211f;
  --art-bg-2: #121313;
}

#portfolio .forma-art-frame {
  position: absolute;
  right: 23%;
  bottom: 25px;
  width: 116px;
  height: 94px;
  border-right: 1px solid rgba(217,180,119,.55);
  border-bottom: 1px solid rgba(217,180,119,.55);
  transform: skewY(-8deg);
}

#portfolio .forma-art-frame i {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(217,180,119,.36);
}

#portfolio .forma-art-frame i:nth-child(1) { top: 22px; }
#portfolio .forma-art-frame i:nth-child(2) { top: 48px; }
#portfolio .forma-art-frame i:nth-child(3) { top: 72px; }

#portfolio .project-art-amore {
  --art-accent: #d8a89e;
  --art-accent-2: #b5a56e;
  --art-bg-1: #4a3734;
  --art-bg-2: #211c1a;
}

#portfolio .project-art-signaldesk {
  --art-accent: #c9f45c;
  --art-accent-2: #ff775d;
  --art-bg-1: #173c31;
  --art-bg-2: #0d211b;
}

#portfolio .project-art-linawledger {
  --art-accent: #79cdb9;
  --art-accent-2: #d6a43a;
  --art-bg-1: #0b4b46;
  --art-bg-2: #062d2c;
}

#portfolio .signaldesk-art-screen,
#portfolio .linawledger-art-screen {
  padding: 0;
  background: #f2f0e9;
}

#portfolio .signaldesk-art-screen img,
#portfolio .linawledger-art-screen img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}

#portfolio .portfolio-v2-card:hover .signaldesk-art-screen img,
#portfolio .portfolio-v2-card:hover .linawledger-art-screen img {
  transform: scale(1.035);
}

#portfolio .amore-art-blooms {
  position: absolute;
  right: 23%;
  bottom: 34px;
  width: 92px;
  height: 92px;
}

#portfolio .amore-art-blooms i {
  position: absolute;
  border: 1px solid rgba(216,168,158,.62);
  border-radius: 50% 50% 48% 52%;
}

#portfolio .amore-art-blooms i:nth-child(1) { inset: 5px 30px 43px 8px; transform: rotate(24deg); }
#portfolio .amore-art-blooms i:nth-child(2) { inset: 30px 6px 10px 35px; transform: rotate(-18deg); }
#portfolio .amore-art-blooms i:nth-child(3) { inset: 22px 27px 24px 22px; border-color: rgba(181,165,110,.75); }

/* Raise the assistant slightly while keeping it aligned with the rail. */
@media (min-width: 992px) {
  .global-chatbot {
    bottom: calc(10% + 28px) !important;
  }
}

@media (max-width: 991px) {
  .global-chatbot {
    bottom: 28px !important;
  }
}

/* =========================================================
   CHATBOT VOICE MODE
========================================================= */

.chatbot-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.chatbot-sound-button,
.chatbot-voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(235, 176, 32, .32);
  border-radius: 50%;
  background: rgba(235, 176, 32, .05);
  color: #c9cbd0;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.chatbot-sound-button {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  border-color: transparent;
  background: transparent;
  font-size: 15px;
}

.chatbot-voice-button:hover,
.chatbot-sound-button:hover,
.chatbot-voice-button.is-active,
.chatbot-sound-button.is-active {
  border-color: rgba(235, 176, 32, .72);
  background: rgba(235, 176, 32, .14);
  color: #ebb020;
}

.chatbot-voice-button:focus-visible,
.chatbot-sound-button:focus-visible {
  outline: 2px solid #ebb020;
  outline-offset: 2px;
}

.chatbot-voice-button.is-listening {
  color: #202124;
  border-color: #ebb020;
  background: #ebb020;
  animation: chatbotVoicePulse 1.15s ease-in-out infinite;
}

.chatbot-voice-button.is-unsupported {
  opacity: .58;
}

.chat-message.bot-system-message .chat-message-bubble {
  color: #c9cbd0;
  border: 1px dashed rgba(235, 176, 32, .32);
  background: rgba(235, 176, 32, .07);
  font-size: 12px;
}

html[data-theme="light"] .chatbot-sound-button,
html[data-theme="light"] .chatbot-voice-button {
  color: #5f636b;
  background: rgba(213, 157, 20, .06);
}

html[data-theme="light"] .chatbot-voice-button:hover,
html[data-theme="light"] .chatbot-sound-button:hover,
html[data-theme="light"] .chatbot-voice-button.is-active,
html[data-theme="light"] .chatbot-sound-button.is-active {
  color: #9f7100;
  background: rgba(213, 157, 20, .14);
}

html[data-theme="light"] .chat-message.bot-system-message .chat-message-bubble {
  color: #5f636b;
  background: rgba(213, 157, 20, .08);
}

@keyframes chatbotVoicePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(235, 176, 32, .35);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(235, 176, 32, 0);
  }
}

@media (max-width: 420px) {
  .chatbot-input-area {
    gap: 6px;
  }

  .chatbot-voice-button,
  .chatbot-send {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .chatbot-input-area input {
    min-width: 0;
    padding-right: 10px !important;
    padding-left: 10px !important;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chatbot-voice-button.is-listening {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star-field-canvas {
    opacity: .7;
  }

  #color-switcher.direct-theme-switcher .theme-mode-stars::after {
    animation: none !important;
  }

  #portfolio .project-live-preview,
  #portfolio .project-live-preview-badge {
    transition: none !important;
  }
}

/* =========================================================
   LUMO IDENTITY AND LIVE SIGNAL
========================================================= */

.chatbot-mini-robot.lumo-brand-icon {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-color: rgba(235, 176, 32, .58);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(235, 176, 32, .18), transparent 58%),
    linear-gradient(145deg, rgba(24, 25, 29, .96), rgba(43, 44, 49, .94));
  box-shadow: inset 0 0 18px rgba(235, 176, 32, .08), 0 8px 22px rgba(0, 0, 0, .2);
  font-size: 0;
}

.lumo-brand-core {
  position: absolute;
  inset: 9px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 214, 107, .88);
  border-radius: 10px;
  background: linear-gradient(145deg, #f4bd33, #c98b00);
  color: #202124;
  box-shadow: 0 0 16px rgba(235, 176, 32, .3);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  margin: 0 !important;
}

.lumo-brand-orbit {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 16px;
  border: 1px solid rgba(235, 176, 32, .34);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(22deg);
  animation: lumoOrbit 5.6s linear infinite;
  margin: 0 !important;
}

.lumo-brand-orbit-two {
  width: 16px;
  height: 38px;
  border-color: rgba(212, 219, 234, .22);
  animation-duration: 7.5s;
  animation-direction: reverse;
}

.lumo-message-avatar {
  position: relative;
  overflow: hidden;
  border-color: rgba(235, 176, 32, .48) !important;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 214, 107, .24), transparent 62%),
    #25262a !important;
  color: #ebb020;
  font-size: 0 !important;
  box-shadow: inset 0 0 12px rgba(235, 176, 32, .08);
}

.lumo-message-avatar > span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(235, 176, 32, .7);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.lumo-teaser-avatar {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(235, 176, 32, .7);
  border-radius: 6px;
  color: #ebb020;
  font-size: 10px !important;
  font-weight: 900;
}

.global-chatbot .chatbot-panel {
  height: min(560px, calc(100dvh - 78px));
}

.lumo-visualizer {
  position: absolute;
  z-index: 8;
  top: 72px;
  right: 0;
  left: 0;
  flex: none;
  min-height: 0;
  padding: 6px 15px 2px;
  overflow: hidden;
  border: 0;
  background: transparent !important;
  pointer-events: none;
}

.lumo-visualizer::before {
  content: "" !important;
  position: absolute;
  z-index: 0;
  top: 18px;
  right: 6px;
  left: 6px;
  height: 68px;
  display: block !important;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 22% 76% at 8% 54%, rgba(1, 6, 4, .94) 0 38%, rgba(1, 6, 4, .68) 62%, transparent 100%),
    radial-gradient(ellipse 28% 94% at 28% 48%, rgba(1, 6, 4, .98) 0 43%, rgba(1, 6, 4, .78) 67%, transparent 100%),
    radial-gradient(ellipse 34% 100% at 50% 54%, rgba(0, 4, 3, 1) 0 48%, rgba(0, 4, 3, .88) 70%, transparent 100%),
    radial-gradient(ellipse 28% 94% at 72% 48%, rgba(1, 6, 4, .98) 0 43%, rgba(1, 6, 4, .78) 67%, transparent 100%),
    radial-gradient(ellipse 22% 76% at 92% 54%, rgba(1, 6, 4, .94) 0 38%, rgba(1, 6, 4, .68) 62%, transparent 100%),
    radial-gradient(ellipse 88% 92% at 50% 54%, rgba(1, 5, 4, .99) 0 49%, rgba(1, 5, 4, .91) 65%, rgba(1, 5, 4, .48) 80%, transparent 100%);
  filter: blur(8px);
  transform-origin: 50% 54%;
  animation: lumoParticleShadowBreathe 6s ease-in-out infinite;
}

.lumo-visualizer::after {
  display: none !important;
  content: none !important;
}

.lumo-visualizer[data-state="speaking"]::before,
.lumo-visualizer[data-state="listening"]::before {
  animation: lumoParticleShadowSpeak 1.15s ease-in-out infinite;
}

.lumo-visualizer-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 18px;
  color: #747984;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.25px;
}

.lumo-visualizer-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lumo-visualizer-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #43d17a;
  box-shadow: 0 0 7px rgba(67, 209, 122, .52);
}

.lumo-visualizer-state {
  color: #9ba0aa;
  font-size: 8px;
  letter-spacing: 1.35px;
}

.lumo-wave-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 56px;
}

.lumo-visualizer[data-state="listening"] .lumo-visualizer-state,
.lumo-visualizer[data-state="speaking"] .lumo-visualizer-state {
  color: #ebb020;
}

.lumo-visualizer[data-state="thinking"] .lumo-visualizer-meta i {
  background: #ebb020;
  box-shadow: 0 0 8px rgba(235, 176, 32, .65);
  animation: lumoSignalBlink .85s ease-in-out infinite;
}

.lumo-visualizer[data-state="speaking"] {
  background: transparent !important;
}

html[data-theme="light"] .chatbot-mini-robot.lumo-brand-icon,
html[data-theme="light"] .lumo-message-avatar {
  background:
    radial-gradient(circle at 50% 44%, rgba(213, 157, 20, .14), transparent 62%),
    #f4f5f7 !important;
  box-shadow: inset 0 0 12px rgba(151, 103, 0, .07);
}

html[data-theme="light"] .lumo-visualizer {
  border: 0;
  background: transparent !important;
}

html[data-theme="light"] .lumo-visualizer-meta,
html[data-theme="light"] .lumo-visualizer-state {
  color: #737984;
}

@keyframes lumoOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes lumoSignalBlink {
  0%, 100% { opacity: .38; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.14); }
}

@keyframes lumoParticleShadowBreathe {
  0%, 100% { transform: scale(1, .94); }
  50% { transform: scale(1.025, 1.04); }
}

@keyframes lumoParticleShadowSpeak {
  0%, 100% { transform: scale(1, .94); }
  50% { transform: scale(1.045, 1.12); }
}

@media (max-width: 991px) {
  .global-chatbot .chatbot-panel {
    height: min(600px, calc(100dvh - 108px));
  }
}

@media (max-width: 420px) {
  .lumo-visualizer {
    top: 66px;
    flex: none;
    min-height: 0;
    padding-top: 5px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .lumo-wave-canvas {
    height: 52px;
  }

  .lumo-visualizer::before {
    top: 17px;
    right: 4px;
    left: 4px;
    height: 62px;
  }

  .chatbot-header-profile span {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lumo-brand-orbit,
  .lumo-visualizer-meta i,
  .lumo-visualizer::before {
    animation: none !important;
  }
}

/* Show Lumo's voice particle field only while speech synthesis is speaking. */
.lumo-visualizer {
  flex-basis: 0 !important;
  min-height: 0 !important;
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom-color: transparent !important;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-7px);
  transition:
    max-height .34s ease,
    min-height .34s ease,
    flex-basis .34s ease,
    padding .34s ease,
    border-color .2s ease,
    opacity .24s ease,
    transform .34s ease;
}

.lumo-visualizer[data-state="speaking"] {
  flex-basis: 88px !important;
  min-height: 88px !important;
  max-height: 88px;
  padding-top: 8px !important;
  padding-bottom: 7px !important;
  border-bottom-color: rgba(255, 255, 255, .065) !important;
  opacity: 1;
  transform: none;
}

html[data-theme="light"] .lumo-visualizer[data-state="speaking"] {
  border-bottom-color: rgba(31, 35, 43, .08) !important;
}

@media (max-width: 420px) {
  .lumo-visualizer[data-state="speaking"] {
    flex-basis: 80px !important;
    min-height: 80px !important;
    max-height: 80px;
  }
}

/* =========================================================
   DESKTOP RIGHT RAIL ORDER + LUMO ANCHOR
========================================================= */

@media (min-width: 992px) {
  .right-rail-theme-slot {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: 34px;
    margin: 0 0 9px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher {
    position: static !important;
    inset: auto !important;
    width: 68px !important;
    height: 30px !important;
    margin: 0 !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-switch {
    width: 68px !important;
    height: 30px !important;
    filter: none !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-thumb {
    top: 3px !important;
    left: 3px !important;
    width: 24px !important;
    height: 24px !important;
    transform: translateX(38px) rotate(360deg) !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-thumb i {
    font-size: 13px !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-switch.is-light .theme-mode-thumb {
    transform: translateX(0) rotate(0) !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-stars {
    left: 6px !important;
    width: 27px !important;
  }

  .right-rail-theme-slot #color-switcher.direct-theme-switcher .theme-mode-cloud {
    right: 6px !important;
    bottom: 6px !important;
    width: 23px !important;
  }

  .right-side #date {
    margin-top: 0 !important;
  }

  /* Keep Lumo centered inside the rail and clear of the arrow controls. */
  .global-chatbot {
    right: calc(5% + 18px) !important;
    bottom: calc(var(--desktop-shell-gap) + 16px) !important;
    left: auto !important;
    transform: none !important;
  }
}
