:root {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-soft: #e8f4ff;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(37, 104, 176, 0.18);
  --line-bright: rgba(22, 132, 222, 0.42);
  --text: #102235;
  --muted: #51677f;
  --blue: #1677cf;
  --cyan: #1aa5ef;
  --green: #1bbf9a;
  --violet: #5f6fe8;
  --shadow: 0 26px 70px rgba(37, 89, 143, 0.16);
  --control-bg: rgba(255, 255, 255, 0.72);
  --control-soft: rgba(255, 255, 255, 0.58);
  --ink-on-accent: #062033;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
  --serif: "Baskerville Old Face", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

:root[data-mode="night"] {
  color-scheme: dark;
  --bg: #0d1118;
  --bg-soft: #101827;
  --panel: rgba(8, 18, 29, 0.84);
  --panel-strong: rgba(10, 28, 42, 0.94);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.095);
  --line: rgba(145, 232, 255, 0.18);
  --line-bright: rgba(145, 239, 255, 0.38);
  --text: rgba(245, 249, 255, 0.95);
  --muted: rgba(216, 228, 240, 0.78);
  --blue: #7ab6ff;
  --cyan: #8defff;
  --green: #a4ffd7;
  --violet: #b3a6ff;
  --shadow: 0 26px 72px rgba(2, 9, 19, 0.48);
  --control-bg: rgba(0, 0, 0, 0.22);
  --control-soft: rgba(255, 255, 255, 0.07);
  --ink-on-accent: #06131c;
}

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

html {
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 12% 10%, rgba(80, 170, 255, 0.24), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(23, 119, 207, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8fcff 38%, #e3f2ff 72%, #cfe7ff 100%),
    var(--bg);
}

:root[data-mode="night"] html {
  background:
    radial-gradient(circle at 12% 10%, rgba(80, 170, 255, 0.14), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(123, 255, 203, 0.08), transparent 30%),
    linear-gradient(135deg, #070b13 0%, #0d1118 44%, #101827 100%),
    var(--bg);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.ziggys-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(232, 244, 255, 0.74)),
    var(--bg);
}

:root[data-mode="night"] body.ziggys-page {
  background:
    linear-gradient(180deg, rgba(5, 9, 20, 0.15), rgba(5, 9, 20, 0.72)),
    var(--bg);
}

#bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.66;
  mix-blend-mode: multiply;
}

:root[data-mode="night"] #bubbles {
  opacity: 0.52;
  mix-blend-mode: screen;
}

.circle-bubble {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.circle-bubble svg {
  display: block;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  transform: scale(1.24);
  transform-origin: center;
}

.bubble-path {
  fill: none;
  stroke-width: 1.45;
  stroke-linecap: round;
  opacity: 0.78;
  filter:
    drop-shadow(0 10px 24px rgba(22, 132, 222, 0.16))
    drop-shadow(0 0 10px rgba(26, 165, 239, 0.16));
}

.active .bubble-path {
  stroke-width: 1.9;
  filter:
    drop-shadow(0 12px 30px rgba(22, 132, 222, 0.2))
    drop-shadow(0 0 18px rgba(27, 191, 154, 0.2));
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}

.brand-mark,
.button-link,
.mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
}

.brand-mark {
  gap: 12px;
  border: 0;
}

.brand-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #062033;
  background:
    linear-gradient(145deg, rgba(66, 244, 255, 0.9), rgba(26, 165, 239, 0.55)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 38px rgba(66, 244, 255, 0.33), inset 0 -8px 16px rgba(0, 0, 0, 0.18);
}

.nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-link,
.mode-toggle {
  padding: 0 18px;
  border-radius: 999px;
  background: var(--control-bg);
  box-shadow: 0 10px 24px rgba(22, 132, 222, 0.08);
  cursor: pointer;
}

:root[data-mode="night"] .button-link,
:root[data-mode="night"] .mode-toggle {
  background: rgba(255, 255, 255, 0.07);
}

.panel,
.svg-logo,
.footer-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 24%, transparent 72%, rgba(66, 244, 255, 0.12));
  opacity: 0.55;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.evidence {
  padding: clamp(26px, 4vw, 46px);
  height: 100%;
}

.hero-copy > *,
.evidence > *,
.recommendation > *,
.svg-logo > * {
  position: relative;
  z-index: 1;
}

.kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 8px 12px;
  border: 1px solid rgba(123, 255, 203, 0.36);
  border-radius: 999px;
  color: var(--green);
  background: rgba(123, 255, 203, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.75rem, 4.7vw, 4.4rem);
  line-height: 1.04;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.65rem);
  line-height: 1.03;
}

.lede,
.section-copy,
.recommendation p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.66;
}

.tag-row {
  margin-top: 28px;
}

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

.tag-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-pill svg {
  width: 13px;
  height: 13px;
  color: var(--blue);
  flex: 0 0 auto;
}

:root[data-mode="night"] .tag-pill {
  border-color: rgba(145, 232, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.fact-grid div {
  padding: 14px;
  border: 1px solid rgba(159, 213, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.fact-grid dt {
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  font-weight: 850;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.css-carousel {
  position: relative;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 14% 16%, rgba(123, 255, 203, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(26, 165, 239, 0.12), rgba(155, 140, 255, 0.06)),
    var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.carousel-viewport {
  overflow: hidden;
  padding: clamp(12px, 2vw, 18px);
}

.carousel-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 260ms ease;
  will-change: transform;
}

.evidence-card {
  flex: 0 0 100%;
  height: clamp(420px, 40vw, 500px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 251, 255, 0.78)),
    rgba(246, 248, 245, 0.96);
  color: #111418;
  box-shadow: 0 18px 42px rgba(15, 37, 55, 0.12);
}

.evidence-card-featured {
  border-color: var(--line-bright);
  box-shadow: 0 22px 50px rgba(37, 136, 184, 0.16);
}

.evidence-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.evidence-card-crop img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.14);
}

.css-carousel:has(#evidence-toggle-selected:checked) .carousel-track {
  transform: translateX(-100%);
}

.css-carousel:has(#evidence-toggle-horizontal:checked) .carousel-track {
  transform: translateX(-200%);
}

.css-carousel:has(#evidence-toggle-application:checked) .carousel-track {
  transform: translateX(-300%);
}

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

.carousel-markers {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 18px 18px;
}

.carousel-toggle {
  position: absolute;
  width: 30px;
  height: 9px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.carousel-marker {
  width: 30px;
  height: 9px;
  display: block;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(22, 119, 207, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  transition:
    width 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.carousel-marker:hover {
  border-color: var(--line-bright);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 0 3px rgba(26, 165, 239, 0.12);
}

.carousel-toggle:focus-visible + .carousel-marker {
  outline: 2px solid var(--line-bright);
  outline-offset: 4px;
}

.carousel-toggle:checked + .carousel-marker {
  width: 52px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow:
    0 0 0 3px rgba(26, 165, 239, 0.1),
    0 8px 18px rgba(22, 119, 207, 0.2);
}

.recommendation {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 1.12fr);
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  padding: clamp(26px, 4vw, 46px);
}

.recommendation img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 37, 55, 0.1);
}

.svg-logo {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: clamp(26px, 4vw, 46px);
}

.next-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: clamp(26px, 4vw, 46px);
}

.next-project h2 {
  margin: 0 0 10px;
}

.next-project p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

.next-project-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.svg-logo-link {
  display: block;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 10%, rgba(123, 255, 203, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.045);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.svg-logo-link:hover,
.svg-logo-link:focus-visible {
  border-color: var(--line-bright);
  background: rgba(26, 165, 239, 0.06);
  box-shadow:
    0 18px 48px rgba(22, 132, 222, 0.18),
    0 0 0 4px rgba(26, 165, 239, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.svg-logo-link img {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin: 0 auto;
}

:root[data-mode="night"] .svg-logo-link img {
  filter: invert(1) brightness(1.12);
}

.footer-panel {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-color: rgba(123, 255, 203, 0.24);
  background:
    radial-gradient(circle at 18% 20%, rgba(123, 255, 203, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(26, 165, 239, 0.16), rgba(155, 140, 255, 0.08));
}

.footer-panel p {
  margin: 0;
  color: var(--muted);
}

.footer-panel strong {
  color: var(--text);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
  transform 180ms ease;
}

:root[data-mode="night"] .footer-social-link {
  background: rgba(255, 255, 255, 0.07);
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--cyan);
  border-color: var(--line-bright);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
  outline: none;
}

.footer-social-link:focus-visible {
  outline: 2px solid var(--line-bright);
  outline-offset: 3px;
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

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

  h1 {
    font-size: clamp(3rem, 12vw, 5rem);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .evidence,
  .recommendation,
  .svg-logo {
    padding: 22px 18px;
  }

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

  .evidence-card {
    flex-basis: 100%;
    height: clamp(330px, 88vw, 390px);
  }

  .evidence-card-featured {
    flex-basis: 100%;
  }

  .evidence-card img {
    height: 100%;
  }
}
