/* ==========================================================================
   marcomistretta.github.io
   Single-page layout: global nav, hero, alternating sections, tiles.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --on-accent: #ffffff;
  --nav-bg: rgba(251, 251, 253, 0.8);
  --figure-bg: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1024px;
  --gutter: clamp(20px, 5vw, 44px);
  --section-y: clamp(72px, 11vw, 140px);
  --nav-h: 52px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #101012;
    --surface: #1c1c1e;
    --surface-2: #161617;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --line: #424245;
    --line-soft: #2c2c2e;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-text: #2997ff;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --figure-bg: #f5f5f7;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --surface: #1c1c1e;
  --surface-2: #161617;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: #424245;
  --line-soft: #2c2c2e;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-text: #2997ff;
  --nav-bg: rgba(22, 22, 23, 0.8);
  --figure-bg: #f5f5f7;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}


/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}

.muted { color: var(--text-3); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container.narrow { max-width: calc(760px + 2 * var(--gutter)); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link:focus { top: 12px; }

@media (max-width: 599px) {
  .hide-sm { display: none; }
}


/* ---------- Global nav ---------- */

.globalnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.globalnav.scrolled { border-bottom-color: var(--line-soft); }

.globalnav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.globalnav-name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.globalnav-name:hover { text-decoration: none; }

.globalnav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.globalnav-links a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
  opacity: 0.8;
  font-size: 13px;
  letter-spacing: -0.01em;
  border-radius: 8px;
  transition: opacity 0.2s, color 0.2s;
}

.globalnav-links a:hover { opacity: 1; text-decoration: none; }
.globalnav-links a.active { opacity: 1; color: var(--accent-text); }

.globalnav-actions { display: flex; align-items: center; gap: 2px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-2);
  font-size: 20px;
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover { color: var(--text); background: var(--line-soft); }

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

.menu-btn { display: none; }
.icon-close { display: none; }

@media (max-width: 833px) {
  .globalnav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 16px var(--gutter) 40px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .globalnav.open .globalnav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .globalnav-links a {
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 1;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }

  .globalnav-actions { margin-left: auto; }

  .menu-btn { display: inline-flex; }
  .globalnav.open .icon-menu { display: none; }
  .globalnav.open .icon-close { display: block; }
  .globalnav.open { background: var(--bg); }
}

body.menu-open { overflow: hidden; }


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  color: var(--accent-text);
  border: 1px solid var(--accent-text);
}

.btn-secondary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.link-btn {
  margin-top: 20px;
  color: var(--accent-text);
  font-size: 17px;
}

.link-btn::after { content: " ›"; }
.link-btn:hover { text-decoration: underline; }


/* ---------- Hero ---------- */

.hero {
  padding: clamp(56px, 9vw, 112px) 0 clamp(72px, 10vw, 128px);
  text-align: center;
  overflow: hidden;
}

.hero-inner { display: flex; flex-direction: column; align-items: center; }

.hero-photo {
  width: clamp(112px, 16vw, 160px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.eyebrow {
  color: var(--text-2);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  padding-bottom: 0.06em;
}

@supports (background: color-mix(in srgb, red 50%, blue)) and ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title {
    background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 70%, var(--accent)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero-subtitle {
  max-width: 680px;
  margin-top: 18px;
  color: var(--text-2);
  font-size: clamp(19px, 2.3vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.social-row {
  display: flex;
  gap: 6px;
  margin-top: 36px;
}

.social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-2);
  font-size: 20px;
  transition: color 0.2s, background 0.2s;
}

.social-row a:hover { color: var(--text); background: var(--line-soft); }


/* ---------- Sections ---------- */

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section-intro {
  max-width: 760px;
  color: var(--text-2);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.section-intro strong { color: var(--text); }

.subsection-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: clamp(48px, 6vw, 72px) 0 20px;
}

.inline-icon { vertical-align: -0.12em; color: var(--text-3); }


/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.4fr 1fr; }
}

.about-text p + p { margin-top: 18px; }
.about-text p { color: var(--text-2); }
.about-text strong { color: var(--text); }

.lead {
  color: var(--text) !important;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.stats {
  display: grid;
  gap: 12px;
}

@media (min-width: 600px) and (max-width: 899px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent-text);
}

.stat-label { color: var(--text-2); font-size: 15px; line-height: 1.35; }


/* ---------- Research tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}

.tile {
  padding: 28px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.tile h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.tile p { color: var(--text-2); font-size: 15px; line-height: 1.45; }


/* ---------- News ---------- */

.news { border-top: 1px solid var(--line-soft); }

.news li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.news time {
  color: var(--text-3);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.news p { font-size: 17px; }

.news .news-more { display: none; }
.news.expanded .news-more { display: grid; }

@media (max-width: 599px) {
  .news li { grid-template-columns: 1fr; gap: 2px; }
}


/* ---------- Publications ---------- */

.segmented {
  display: inline-flex;
  gap: 2px;
  margin: clamp(28px, 4vw, 40px) 0 24px;
  padding: 3px;
  background: var(--line-soft);
  border-radius: 999px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segment {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.segment:hover { color: var(--text); }

.segment.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.papers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 20px;
}

.paper {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.paper:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.paper[hidden] { display: none; }

.paper-media {
  display: block;
  aspect-ratio: 16 / 9;
  padding: 18px;
  background: var(--figure-bg);
  border-bottom: 1px solid var(--line-soft);
}

.paper-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}

.paper:hover .paper-media img { transform: scale(1.03); }

.paper-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 26px 26px;
}

.paper-venue {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.paper-venue span { color: var(--text-3); font-weight: 400; margin-left: 6px; }

.paper-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.paper-title a { color: var(--text); }

.paper-authors { color: var(--text-2); font-size: 14px; line-height: 1.45; margin-bottom: 10px; }
.paper-authors strong { color: var(--text); }

.paper-abstract { color: var(--text-2); font-size: 15px; line-height: 1.45; margin-bottom: 18px; }

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: auto;
  font-size: 15px;
}

.paper-links a,
.paper-links button { color: var(--accent-text); }

.paper-links a::after,
.paper-links button::after { content: " ›"; }

.paper-links button:hover { text-decoration: underline; }


/* ---------- Experience ---------- */

.columns {
  display: grid;
  gap: 0 clamp(40px, 6vw, 80px);
}

@media (min-width: 834px) {
  .columns { grid-template-columns: 1fr 1fr; }
}

.columns .subsection-title { margin-top: clamp(28px, 4vw, 40px); }
.columns-spaced { margin-top: clamp(16px, 3vw, 32px); }

.timeline li {
  position: relative;
  padding: 0 0 26px 22px;
  border-left: 1px solid var(--line);
}

.timeline li:last-child { padding-bottom: 4px; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.section-alt .timeline li::before { background: var(--bg-alt); }

.timeline-date { color: var(--text-3); font-size: 14px; margin-bottom: 2px; }

.timeline h4 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 4px;
}

.timeline p:not(.timeline-date) { color: var(--text-2); font-size: 16px; line-height: 1.45; }

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

.chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 14px;
}


/* ---------- CV ---------- */

.cv-card {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .cv-card { grid-template-columns: 1fr 1.1fr; }
}

.cv-ctas { justify-content: flex-start; }

.cv-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cv-pages img {
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  background: #fff;
  transition: transform 0.5s var(--ease);
}

.cv-pages:hover img:first-child { transform: rotate(-1.5deg) translateY(-4px); }
.cv-pages:hover img:last-child { transform: rotate(1.5deg) translateY(-4px); }


/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin-top: clamp(32px, 5vw, 48px);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 16px 18px 22px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-icon { font-size: 24px; color: var(--text-2); }

.contact-text { flex: 1; min-width: 0; }

.contact-label { color: var(--text-3); font-size: 13px; }

.contact-text a {
  display: block;
  color: var(--text);
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-text a:hover { color: var(--accent-text); text-decoration: none; }


/* ---------- Footer ---------- */

.footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--text-2); }


/* ---------- BibTeX dialog ---------- */

.bibtex-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
  padding: 24px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.bibtex-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bibtex-dialog[open] { animation: dialog-in 0.3s var(--ease); }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.bibtex-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bibtex-head h3 { font-size: 21px; font-weight: 600; }

.bibtex-dialog pre {
  margin: 0 0 18px;
  padding: 16px;
  overflow-x: auto;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: break-word;
}


/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.92);
  color: #f5f5f7;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .paper, .paper-media img, .cv-pages img { transition: none; }
}


/* ---------- Phone refinements ---------- */

@media (max-width: 599px) {
  /* single column: let each figure keep its own height instead of a 16:9 box */
  .paper-media { aspect-ratio: auto; padding: 14px; }
  .paper-media img { height: auto; }

  .paper-body { padding: 20px 20px 22px; }
  .paper-title { font-size: 19px; }

  .tile { padding: 22px; }

  .stat { padding: 18px 20px; }

  .hero-ctas .btn { min-width: 200px; }

  .cv-card { padding: 24px; }
}


/* ---------- Affiliation logos (hero) ---------- */

.logo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 56px);
  margin-top: clamp(36px, 5vw, 48px);
  padding-top: clamp(28px, 4vw, 36px);
  border-top: 1px solid var(--line-soft);
}

.logo-strip a { display: block; }

.logo-strip img {
  width: auto;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.logo-strip a:hover img,
.logo-strip a:focus-visible img { filter: none; opacity: 1; }

.logo-alexa { height: clamp(30px, 4vw, 38px); }
.logo-unifi { height: clamp(40px, 5.5vw, 52px); }

/* the UniFi logo is black: show it white on dark backgrounds */
:root[data-theme="dark"] .logo-unifi,
:root[data-theme="dark"] .logo-strip a:hover .logo-unifi { filter: invert(1); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-unifi,
  :root:not([data-theme="light"]) .logo-strip a:hover .logo-unifi { filter: invert(1); }
}
