/* ============================
   ROOT + GLOBALS
   ============================ */

:root {
  --brand: #0b8793;
  --bg: #ffffff;
  --text: #111;
  --muted: #666;

  /* make 100% zoom feel like ~75% browser zoom */
  --ui-scale: 0.75;

  /* fixed bars */
  --topnav-h: calc(56px * var(--ui-scale));
  --footer-h: calc(100px * var(--ui-scale));
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--brand);
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: calc(1rem * var(--ui-scale));
}

/* Desktop: remove outer scrollbar — only main content scrolls */
html,
body {
  height: 100%;
  overflow: hidden;
}

/* ============================
   LAYOUT: SIDEBAR + MAIN
   ============================ */

.layout-root {
  display: flex;
  min-height: 100vh;
  align-items: stretch;

  height: 100vh;
  /* desktop panel */
}

/* ============================
   SIDEBAR
   ============================ */

.site-sidebar {
  width: calc(520px * var(--ui-scale));
  background: linear-gradient(180deg, #073740, #0b8793);
  color: #fff;
  flex-shrink: 0;
  padding: calc(2rem * var(--ui-scale)) calc(1.25rem * var(--ui-scale));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  max-width: calc(440px * var(--ui-scale));
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.sidebar-intro {
  display: flex;
  align-items: center;
  gap: calc(14px * var(--ui-scale));
  margin-bottom: calc(14px * var(--ui-scale));
}

.site-sidebar .avatar {
  margin: 0;
  flex-shrink: 0;
}

.site-sidebar .avatar img {
  width: calc(200px * var(--ui-scale));
  height: calc(200px * var(--ui-scale));
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 4px solid rgba(255, 255, 255, 0.15);
}

.hello {
  margin: 0;
  font-size: calc(2rem * var(--ui-scale));
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.short-bio {
  font-size: calc(1.05rem * var(--ui-scale));
  line-height: 1.6;
  margin: calc(4px * var(--ui-scale)) 0 calc(1.25rem * var(--ui-scale));
  color: rgba(255, 255, 255, 0.9);
}

.short-bio strong {
  font-size: 1.35em;
  font-weight: 700;
}

.sidebar-spacer {
  flex: 1;
}

/* NEWS box */
.sidebar-news {
  margin-top: calc(14px * var(--ui-scale));
  padding: calc(14px * var(--ui-scale)) calc(14px * var(--ui-scale)) calc(10px * var(--ui-scale));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
}

.sidebar-news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(12px * var(--ui-scale));
  margin-bottom: calc(10px * var(--ui-scale));
}

.sidebar-news h4 {
  margin: 0;
  font-size: calc(1.05rem * var(--ui-scale));
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sidebar-news-all {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: calc(0.9rem * var(--ui-scale));
}

.sidebar-news-all:hover {
  color: #fff;
  text-decoration: underline;
}

.sidebar-news-list {
  max-height: calc(360px * var(--ui-scale));
  overflow-y: auto;
  padding-right: calc(6px * var(--ui-scale));
}

.sidebar-news-item {
  padding: calc(10px * var(--ui-scale)) 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
}

.sidebar-news-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.sidebar-news-date {
  font-size: calc(0.82rem * var(--ui-scale));
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: calc(4px * var(--ui-scale));
}

.sidebar-news-title {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.15;
}

.sidebar-news-title:hover {
  text-decoration: underline;
}

.sidebar-news-text {
  margin-top: calc(6px * var(--ui-scale));
  font-size: calc(1.05rem * var(--ui-scale));
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.90);
}

.sidebar-news-list::-webkit-scrollbar {
  width: 8px;
}

.sidebar-news-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 10px;
}

.sidebar-news-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.10);
  border-radius: 10px;
}

/* Contacts */
.contacts {
  margin-top: auto;
  padding-top: calc(1.5rem * var(--ui-scale));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.contacts p {
  margin: 0 0 calc(0.5rem * var(--ui-scale)) 0;
}

.social-icons {
  display: flex;
  gap: calc(14px * var(--ui-scale));
  margin-top: calc(10px * var(--ui-scale));
  align-items: center;
  flex-wrap: wrap;
}

.social-icons a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(34px * var(--ui-scale));
  height: calc(34px * var(--ui-scale));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.social-icons a:hover {
  transform: scale(1.08);
  opacity: .92;
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-footer {
  margin-top: calc(0.75rem * var(--ui-scale));
  font-size: calc(0.8rem * var(--ui-scale));
  color: rgba(255, 255, 255, 0.75);
}

/* ============================
   MAIN COLUMN (desktop: fixed top nav + fixed footer)
   ============================ */

.main-column {
  flex: 1 1 auto;
  background: #fff;
  color: var(--text);

  height: 100vh;
  min-height: 0 !important;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

/* Top nav */
.top-nav {
  background: #0d7d82;
  color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);

  position: fixed;
  top: 0;
  left: calc(520px * var(--ui-scale));
  /* align under sidebar */
  right: 0;
  z-index: 1000;
  height: var(--topnav-h);
}

.top-nav .top-nav-inner {
  display: flex;
  align-items: center;
  gap: calc(1rem * var(--ui-scale));
  padding: calc(.75rem * var(--ui-scale)) calc(1rem * var(--ui-scale));
  height: 100%;
}

.top-nav .menu-toggle {
  display: none;
  background: transparent;
  color: white;
  border: 0;
  font-size: calc(1.25rem * var(--ui-scale));
  cursor: pointer;
}

.top-nav .main-nav {
  display: flex;
  gap: calc(1.1rem * var(--ui-scale));
  align-items: center;
}

.top-nav .main-nav a {
  color: white;
  text-decoration: none;
  padding: calc(.3rem * var(--ui-scale)) calc(.45rem * var(--ui-scale));
  font-weight: 600;
}

.top-nav .main-nav a.active {
  text-decoration: underline;
}

/* Main scroll area (ONLY this scrolls) */
.site-main {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;

  /* hide scrollbar (keep scroll) */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/old Edge */
}

.site-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Keep padding even when .container class is present */
.site-main.container {
  padding:
    calc(2rem * var(--ui-scale) + var(--topnav-h)) calc(2rem * var(--ui-scale)) calc(3rem * var(--ui-scale) + var(--footer-h));
}

/* Footer */
.site-footer {
  background: #f7f7f7;
  padding: calc(1rem * var(--ui-scale));

  position: fixed;
  bottom: 0;
  left: calc(520px * var(--ui-scale));
  /* align under sidebar */
  right: 0;
  z-index: 1000;

  height: var(--footer-h);
  overflow: hidden;

  margin-top: 0 !important;
  flex: 0 0 var(--footer-h);

  box-shadow: 0 -8px 24px rgba(0, 0, 0, .10);
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.footer-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(20px * var(--ui-scale));
}

.footer-text {
  font-size: calc(0.95rem * var(--ui-scale));
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right area: button + bonfire */
.bonfire-area {
  height: 100%;
  display: flex;
  align-items: center;
  gap: calc(12px * var(--ui-scale));
  flex-shrink: 0;
}

/* round button with tooltip */
.bonfire-btn {
  width: calc(34px * var(--ui-scale));
  height: calc(34px * var(--ui-scale));
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .2);
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}

.bonfire-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.bonfire-btn::after {
  content: "light-up your passion";
  position: absolute;
  right: 120%;
  bottom: 50%;
  transform: translateY(50%);
  white-space: nowrap;
  font-size: calc(0.8rem * var(--ui-scale));
  font-weight: 600;
  background: rgba(0, 0, 0, .85);
  color: #fff;
  padding: calc(6px * var(--ui-scale)) calc(10px * var(--ui-scale));
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.bonfire-btn:hover::after {
  opacity: 1;
}

.bonfire-btn.active {
  border-color: rgba(255, 140, 0, .55);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, .18);
}

.bonfire-btn.is-hidden {
  display: none;
}

/* Bonfire container */
.bonfire-fixed {
  height: 100%;
  width: calc(180px * var(--ui-scale));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
}

.bonfire-fixed.is-hidden {
  display: none;
}

.bonfire-img {
  max-height: calc(120px * var(--ui-scale));
  width: auto;
  height: auto;
  display: block;
  transform-origin: 70% 70%;
  animation:
    flameBreath 2.4s ease-in-out infinite alternate,
    heatJitter 1.6s steps(2, end) infinite;
}

@keyframes flameBreath {
  from {
    filter: drop-shadow(0 0 7px rgba(255, 140, 0, .25));
    transform: scale(1);
  }

  to {
    filter: drop-shadow(0 0 22px rgba(255, 120, 0, .45));
    transform: scale(1.01);
  }
}

@keyframes heatJitter {
  0% {
    transform: translateX(0) scale(1);
  }

  50% {
    transform: translateX(0.6px) scale(1.005);
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

.bonfire-fixed::before,
.bonfire-fixed::after {
  content: "";
  position: absolute;
  width: calc(4px * var(--ui-scale));
  height: calc(4px * var(--ui-scale));
  background: radial-gradient(circle, rgba(255, 210, 127, 1) 0%, rgba(255, 140, 0, 1) 60%, rgba(255, 140, 0, 0) 100%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.bonfire-fixed::before {
  left: 58%;
  bottom: 38%;
  animation: sparkUp 2.6s linear infinite;
}

.bonfire-fixed::after {
  left: 52%;
  bottom: 34%;
  animation: sparkUp 3.2s linear infinite 1.1s;
}

@keyframes sparkUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  70% {
    transform: translateY(-34px) scale(.7);
    opacity: .8;
  }

  100% {
    transform: translateY(-52px) scale(.35);
    opacity: 0;
  }
}

.bonfire-fixed.ignite {
  animation: igniteFlash .45s ease-out;
}

@keyframes igniteFlash {
  0% {
    filter: brightness(1);
    transform: scale(.98);
  }

  45% {
    filter: brightness(1.35);
    transform: scale(1.03);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

/* Bonfire ONLY: keep animating even with reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .bonfire-img {
    animation: flameBreath 2.4s ease-in-out infinite alternate,
      heatJitter 1.6s steps(2, end) infinite !important;
  }

  .bonfire-fixed::before,
  .bonfire-fixed::after {
    animation: sparkUp 2.6s linear infinite !important;
    opacity: 1;
  }

  .bonfire-fixed::after {
    animation-duration: 3.2s !important;
    animation-delay: 1.1s !important;
  }

  .bonfire-fixed.ignite {
    animation: igniteFlash .45s ease-out !important;
  }
}

/* ============================
   CARDS / GENERIC UI
   ============================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(220px * var(--ui-scale)), 1fr));
  gap: calc(1rem * var(--ui-scale));
}

.card {
  background: #fff;
  border: 1px solid #eee;
  padding: calc(1rem * var(--ui-scale));
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.page-lead {
  margin-top: calc(-0.25rem * var(--ui-scale));
  opacity: .85;
}

.list-cards {
  display: grid;
  gap: calc(1rem * var(--ui-scale));
}

.simple-card {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  padding: calc(1rem * var(--ui-scale));
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.simple-card-head {
  display: flex;
  align-items: center;
  gap: calc(.75rem * var(--ui-scale));
  flex-wrap: wrap;
  margin-bottom: calc(.35rem * var(--ui-scale));
}

.badge {
  font-weight: 800;
  font-size: calc(.8rem * var(--ui-scale));
  padding: calc(.25rem * var(--ui-scale)) calc(.6rem * var(--ui-scale));
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: rgba(13, 125, 130, .10);
  color: #0b8793;
}

.muted {
  opacity: .75;
  font-weight: 600;
}

.ext,
.event-link {
  font-weight: 700;
  text-decoration: none;
  margin-left: auto;
  color: var(--brand);
}

.ext:hover,
.event-link:hover {
  text-decoration: underline;
}

/* ============================
   PUBLICATIONS
   ============================ */

.pub-list {
  padding-left: calc(1.1rem * var(--ui-scale));
}

.pub-item {
  margin: 0 0 calc(1.1rem * var(--ui-scale)) 0;
}

.pub-authors,
.pub-venue {
  opacity: .85;
}

.pub-title {
  font-weight: 700;
  margin: calc(.1rem * var(--ui-scale)) 0;
}

.pub-links {
  margin-top: calc(.2rem * var(--ui-scale));
  font-size: calc(.95em * var(--ui-scale));
}

/* Filters/tags */
.pub-filters,
.year-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.tag-filter,
.year-filter,
.chip,
.pub-tag {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.tag-filter.is-active,
.year-filter.is-active,
.chip.is-active {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.06);
}

.pub-filter-status,
.event-filter-status {
  margin: 0 0 1rem;
  opacity: 0.75;
  font-size: 0.95em;
}

.pub-tags {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-tag {
  background: rgba(0, 0, 0, 0.03);
  padding: 0.18rem 0.5rem;
  font-size: 0.9em;
}

.pub-tag:hover {
  background: rgba(0, 0, 0, 0.06);
}

.badge-featured {
  margin-left: 0.5rem;
}

/* ============================
   EVENTS FILTERS
   ============================ */

.event-filters {
  margin: 0.75rem 0 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  opacity: 0.7;
  font-size: 0.95em;
}

/* ============================
   TEACHING
   ============================ */

.teaching-filters {
  display: flex;
  gap: calc(16px * var(--ui-scale));
  margin: calc(16px * var(--ui-scale)) 0 calc(22px * var(--ui-scale));
  flex-wrap: wrap;
}

.teaching-filter label {
  display: block;
  font-weight: 600;
  margin-bottom: calc(6px * var(--ui-scale));
}

.teaching-filter select {
  padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

.teaching-degree {
  margin: calc(18px * var(--ui-scale)) 0 calc(10px * var(--ui-scale));
}

.teaching-dept {
  margin: calc(12px * var(--ui-scale)) 0 calc(10px * var(--ui-scale));
  color: rgba(0, 0, 0, 0.7);
}

.teaching-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(260px * var(--ui-scale)), 1fr));
  gap: calc(12px * var(--ui-scale));
  margin-bottom: calc(18px * var(--ui-scale));
}

.teaching-card {
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 12px;

  padding:
    calc(2px * var(--ui-scale))
    /* TOP più piccolo */
    calc(14px * var(--ui-scale))
    /* LEFT/RIGHT */
    calc(12px * var(--ui-scale));
  /* BOTTOM */

  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.teaching-course {
  font-weight: 800;
  margin-bottom: calc(8px * var(--ui-scale));
  font-size: calc(1.55rem * var(--ui-scale));
}

.teaching-years {
  display: flex;
  gap: calc(6px * var(--ui-scale));
  flex-wrap: wrap;
}

.teaching-chip {
  font-size: calc(16px * var(--ui-scale));
  padding: calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale));
  border-radius: 999px;
  background: rgba(13, 125, 130, 0.10);
  border: 1px solid rgba(13, 125, 130, 0.25);
}

.teaching-context {
  margin: 0.25rem 0 1rem;
  opacity: 0.75;
}

.teaching-meta {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.25;

  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.teaching-meta-sep {
  opacity: 0.6;
}

.teaching-materials {
  margin-top: 0.45rem;
  font-size: 0.95rem;
}

.teaching-materials-label {
  opacity: 0.75;
  margin-right: 0.35rem;
}

.teaching-materials-list {
  margin: calc(8px * var(--ui-scale)) 0 0;
  padding-left: calc(18px * var(--ui-scale));
}

.teaching-materials-inline a {
  white-space: nowrap;
}

.teaching-link-sep {
  opacity: 0.6;
  margin: 0 0.25rem;
}

.teaching-offerings {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.35rem;
}

.teaching-offering {
  padding: 0;
}

/* ============================
   TOPICS GRAPH
   ============================ */

.topics-graph-wrap {
  width: 100%;
  margin: calc(1rem * var(--ui-scale)) auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;

  height: calc(550px * var(--ui-scale));
}

.topics-graph-svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: calc(980px * var(--ui-scale));
}

.topics-graph-svg .arc {
  stroke: rgba(13, 125, 130, 0.55);
  stroke-width: 10;
  fill: none;
  stroke-linecap: round;
}

.topics-graph-svg .center-ring {
  fill: none;
  stroke: rgba(13, 125, 130, 0.55);
  stroke-width: 4;
}

.topics-graph-svg .node circle {
  fill: #f7f7f7;
  stroke: rgba(13, 125, 130, 0.85);
  stroke-width: 3;
}

.topics-graph-svg .node text {
  font-size: 12px;
  font-weight: 700;
  fill: #0b3b40;
  pointer-events: none;
}

.topics-graph-svg a.node-link {
  cursor: pointer;
}

.topics-graph-svg a.node-link:hover .node circle {
  fill: rgb(18, 165, 172);
  filter: drop-shadow(0 0 6px rgba(18, 165, 172, 0.4));
  transition: all 0.25s ease;
}

/* Base: allow SVG to receive events */
.topics-graph-svg {
  pointer-events: auto;
}

/* Nodes are interactive */
.topics-graph-svg a.node-link {
  pointer-events: auto;
}

/* Non-interactive text should not block hover */
.topics-graph-svg .node text {
  pointer-events: none;
}

.page-top-anchor {
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ============================
   SMALL UTIL LINKS
   ============================ */

.project-title-link {
  color: #0b8793;
  text-decoration: none;
  font-weight: 700;
}

.project-title-link:hover {
  text-decoration: underline;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 920px) {

  /* Topics graph footprint */
  .topics-graph-wrap {
    height: 340px;
  }

  .topics-graph-svg {
    max-width: 100%;
    width: 100%;
    max-height: 360px;
  }

  /* Layout stacks */
  .layout-root {
    flex-direction: column;
  }

  /* Let the page scroll again on mobile */
  html,
  body {
    height: auto !important;
    overflow: auto !important;
  }

  /* Disable desktop panel behavior */
  .layout-root {
    height: auto !important;
    min-height: 100dvh !important;
  }

  .main-column {
    height: auto !important;
    overflow: visible !important;
    min-height: 0 !important;
  }

  .site-main {
    overflow: visible !important;
  }

  .site-main.container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Sidebar becomes normal block */
  .site-sidebar {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    top: auto !important;
    overflow: visible !important;
    padding: 1rem !important;
  }

  .sidebar-inner {
    max-width: 100%;
  }

  /* Top nav + footer not fixed on mobile */
  .top-nav,
  .site-footer {
    position: sticky !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Footer: center bonfire + allow wrap */
  .site-footer {
    height: auto !important;
    overflow: visible !important;
    padding-bottom: calc(1.5rem * var(--ui-scale));
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: calc(12px * var(--ui-scale));
    height: auto !important;
  }

  .footer-text {
    white-space: normal;
  }

  .bonfire-area {
    justify-content: center;
    width: 100%;
    height: auto;
    flex-wrap: wrap;
  }

  .bonfire-fixed {
    width: auto;
    height: auto;
    justify-content: center;
  }

  .bonfire-img {
    max-height: calc(90px * var(--ui-scale));
  }

  /* Mobile nav: hamburger + horizontal clipped when closed, dropdown when open */
  .top-nav .top-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .top-nav .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 24px;
    line-height: 1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
  }

  /* CLOSED (horizontal): slim + clipped */
  .top-nav .main-nav {
    margin: 0;
    padding: 0;
    background: transparent;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;

    flex: 1;
    overflow: hidden;
    white-space: nowrap;
  }

  .top-nav .main-nav a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: .45rem .2rem;
    font-weight: 600;
    position: relative;
  }

  .top-nav .main-nav a.active {
    text-decoration: none;
  }

  .top-nav .main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }

  /* OPEN (dropdown): show all */
  .top-nav .main-nav.open {
    margin-top: .5rem;
    padding: .5rem 0;
    background: #0d7d82;

    overflow: visible;
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav .main-nav.open a {
    width: 100%;
    padding: .6rem 1rem;
  }
}