:root {
  --project-accent: #E03838;
  --project-ink: #111111;
  --project-muted: #606060;
  --project-bg: #fcfcfc;
  --project-soft-rect-radius: 8px;
  --project-panel-bg: linear-gradient(180deg, rgba(249, 247, 242, 0.98) 0%, rgba(243, 239, 232, 0.96) 100%);
  color-scheme: light;
}

html {
  background-color: var(--project-bg);
}

body {
  color: var(--project-ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--project-bg) 100%);
}

a:link,
a:visited,
a:hover,
a:active {
  color: var(--project-accent);
}

.project-container {
  padding-bottom: 1rem;
}

.project-nav-row {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.project-subtitle {
  margin: 0.25rem 0 0 0;
  font-family: "Alegreya", serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--project-muted);
}

/* Make the submission line slightly more present without shouting */
.publication-status {
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 0.15rem;
}

@media (max-width: 576px) {
  .full-title {
    font-size: 2.0em;
  }

  .project-subtitle {
    font-size: 0.9rem;
    letter-spacing: -0.012em;
    white-space: nowrap;
  }
}

/* Affiliation line: match button-sized typography */
.project-affiliation {
  font-family: "Alegreya", serif;
  font-size: 1.08rem;
  font-weight: 500;
  text-align: center;
  color: var(--project-muted);
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* Clickable author bio toggle (name expands/collapses a short bio) */
.author-bio {
  display: inline-block;
  text-align: center;
}
.author-bio summary {
  list-style: none;
}
.author-bio summary::-webkit-details-marker {
  display: none;
}
.author-bio summary.author-name {
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: "Alegreya", serif;
  font-size: 1.2em;
  color: #000;
  text-decoration: none;
}

.author-social {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
}
.author-social:hover {
  opacity: 1;
}
.author-social .fa {
  font-size: 0.95em;
  padding-left: 0;
  padding-right: 0;
  line-height: 1;
  vertical-align: -0.08em;
}
.author-bio summary.author-name:focus {
  outline: none;
}
.author-toggle-hint::after {
  content: "bio ▾";
  font-size: 0.75em;
  letter-spacing: 0.02em;
  opacity: 0.65;
  color: var(--project-muted);
}
.author-bio[open] .author-toggle-hint::after {
  content: "close ▴";
  opacity: 0.75;
}
.author-bio summary.author-name:hover .author-toggle-hint::after {
  opacity: 0.95;
}
.author-bio-text {
  margin-top: 0.35rem;
  max-width: 620px;
  font-size: 0.95rem;
  color: #171717;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  hyphens: auto;
  line-height: 1.54;
}

.bio-paragraph {
  display: block;
  margin-top: 0.72rem;
}

/* Inline links inside bio: same typography, subtle dotted underline to hint clickability */
.bio-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
}
.bio-link:hover {
  border-bottom-color: rgba(0, 0, 0, 0.65);
}

.bio-contact {
  display: block;
  margin-top: 0.04rem;
  font-family: "Alegreya", serif;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--project-muted);
}

.bio-contact + .bio-contact {
  margin-top: 0.08rem;
}

.bio-contact-last {
  margin-bottom: 0.48rem;
}

@media (max-width: 576px) {
  .author-bio-text {
    text-align: left;
    hyphens: manual;
  }
}

/* Header GitHub icon: keep it aligned and not huge (Font Awesome base styles are large). */
.project-nav-row .link-button .fa,
.project-nav-row .link-button-small .fa {
  font-size: 1em;
  padding-left: 0;
  padding-right: 0;
  line-height: 1;
  vertical-align: -0.08em;
}

.project-text-left {
  text-align: left;
}

.paper-blurb {
  margin-top: 0.8rem;
  margin-bottom: 0.75rem;
}

.paper-abstract-toggle summary {
  margin-bottom: 0.65rem;
}

.paper-abstract-toggle[open] {
  display: block;
  margin-bottom: 1rem;
}

.paper-abstract {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--project-soft-rect-radius);
  background: rgba(0, 0, 0, 0.03);
  color: var(--project-ink);
}

.project-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--project-accent);
  list-style: none;
}

.project-details summary::-webkit-details-marker {
  display: none;
}
.project-details summary::marker {
  content: "";
}
.project-details summary::after {
  content: "▾";
  opacity: 0.65;
  font-size: 0.9em;
}
.project-details[open] summary::after {
  content: "▴";
}
.project-details summary:hover {
  opacity: 0.9;
}

.project-pdf {
  margin-top: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--project-soft-rect-radius);
  overflow: hidden;
}

.project-pdf iframe {
  width: 100%;
  height: 70vh;
  border: 0;
}

.project-citation {
  margin-top: 0;
}

.project-citation-title {
  margin: 0 0 0.75rem 0;
  font-family: "Alegreya", serif;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--project-ink);
}

.project-citation-block {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--project-soft-rect-radius);
  background: linear-gradient(180deg, rgba(242, 242, 240, 0.98) 0%, rgba(236, 236, 233, 0.98) 100%);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.04);
  overflow: hidden;
}

.project-citation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.68rem 0.95rem 0.08rem 0.95rem;
}

.project-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--project-soft-rect-radius);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(17, 17, 17, 0.96);
  font-size: 0.84rem;
  font-weight: 550;
  padding: 0.42rem 0.88rem;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.project-copy-button:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: rgba(17, 17, 17, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.project-copy-button.is-copied {
  background: rgba(229, 229, 227, 0.9);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(17, 17, 17, 0.96);
}

.project-citation-pre {
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 0.08rem 1.15rem 1rem 1.15rem;
  color: var(--project-ink);
  font-size: 0.91rem;
  line-height: 1.62;
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  text-align: left;
}

.project-citation-pre code {
  display: inline-block;
  font-family: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-kerning: none;
  font-variant-ligatures: none;
  letter-spacing: 0;
  opacity: 0.92;
  text-align: left;
}

.bibtex-at {
  display: inline-block;
  margin-right: 0.12em;
}

.project-figure {
  margin: 0 0 1.25rem 0;
}

.project-caption {
  max-width: 600px;
  margin: 0.9rem auto 0 auto;
  font-size: 0.95rem;
  color: #2d2d2d;
  text-align: left;
}

.figure-label {
  font-weight: 700;
}

.big-teaser-image {
  width: 100%;
  max-height: 460px;
  filter: brightness(0.7);
  object-fit: fill;
}

.media-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  padding: 0 2.25rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.media-frame {
  position: absolute;
  inset: 0 2.25rem;
  width: calc(100% - 4.5rem);
  height: 100%;
  object-fit: contain;
}

.media-frame-base {
  opacity: 1;
  animation: media-frame-base-cycle 8s steps(1, end) infinite;
}

.media-frame-fade {
  opacity: 0;
  animation: media-frame-fade-cycle 8s steps(1, end) infinite;
}

.cambria-mark {
  font-family: "Alegreya SC", "Alegreya", serif;
  font-size: 1.08em;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.project-caption .cambria-mark {
  color: var(--project-ink);
}

a.cambria-link,
a.cambria-link:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
  transition: border-bottom-color 120ms ease;
}

a.cambria-link:hover,
a.cambria-link:active {
  color: inherit;
  text-decoration: none;
  border-bottom-color: rgba(0, 0, 0, 0.65);
}

.caption-accent {
  color: var(--project-accent);
  font-weight: 700;
}

.caption-strong {
  font-weight: 700;
}

.video-panel-row {
  margin-top: 1.25rem;
}

.project-video-figure {
  margin-bottom: 0;
}

.project-video-caption {
  max-width: 760px;
}

.comparison-card {
  width: 100%;
}

.comparison-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.comparison-toggle {
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: rgba(255, 252, 244, 0.92);
  color: var(--project-ink);
  border-radius: 999px;
  padding: 0.34rem 0.74rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.comparison-toggle:hover {
  border-color: rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.comparison-toggle.active {
  background: var(--project-accent);
  border-color: var(--project-accent);
  color: #fffaf2;
}

.comparison-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 0.08rem rgba(17, 17, 17, 0.08);
}

.project-section-body {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.project-ack-section {
  max-width: 820px;
}

.project-ack-section .paper-blurb {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.72;
  text-wrap: pretty;
  hyphens: auto;
}

.comparison-stage {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: var(--project-soft-rect-radius);
  background: #0d1216;
}

.comparison-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.comparison-top {
  width: 100%;
}

.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 248, 231, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  transform: translateX(-1px);
  pointer-events: none;
}

.comparison-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 248, 231, 0.95);
  background: rgba(17, 17, 17, 0.68);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.comparison-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.001;
  cursor: ew-resize;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.comparison-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 0;
}

.comparison-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
}

.comparison-slider::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.comparison-slider::-moz-range-track {
  height: 100%;
  background: transparent;
}

.comparison-label {
  position: absolute;
  top: 0.85rem;
  z-index: 2;
  padding: 0.22rem 0.55rem;
  border-radius: var(--project-soft-rect-radius);
  background: rgba(17, 17, 17, 0.58);
  color: #fff8eb;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.comparison-label-left {
  left: 0.85rem;
}

.comparison-label-right {
  right: 0.85rem;
}

@media (max-width: 768px) {
  .project-figure {
    margin-bottom: 1.75rem;
  }

  .project-caption {
    max-width: 100%;
    margin-top: 0.75rem;
    padding: 0 0.35rem;
    text-align: left;
  }

  .big-teaser-image {
    max-height: 380px;
  }

  .comparison-stage {
    height: 240px;
  }

  .comparison-toolbar {
    gap: 0.4rem;
  }

  .comparison-toggle {
    padding: 0.28rem 0.6rem;
    font-size: 0.79rem;
  }

  .project-citation-pre {
    display: block;
    padding: 0.08rem 0.85rem 0.95rem 0.85rem;
    font-size: 0.84rem;
    line-height: 1.56;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: visible;
    overflow-y: visible;
  }

  .project-citation-pre code {
    display: block;
    max-width: 100%;
  }

}

@keyframes media-frame-base-cycle {
  0% {
    opacity: 1;
  }
  49.9% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes media-frame-fade-cycle {
  0% {
    opacity: 0;
  }
  49.9% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* Statement typography (curated, lightweight typesetting) */
.statement-title {
  margin: 0 0 0.75rem 0;
  font-family: "Alegreya SC", "Alegreya", serif;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--project-ink);
  text-align: left;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.statement .accent {
  color: var(--project-accent);
  font-weight: 600;
}

.project-name {
  font-family: "Alegreya SC", "Alegreya", serif;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--project-ink);
}

.statement-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
}
.statement-link:hover {
  border-bottom-color: rgba(0, 0, 0, 0.65);
}

.statement-question {
  margin-top: 1.35rem;
  margin-bottom: 0.95rem;
  font-style: italic;
  font-size: 1.08rem;
  font-weight: 575;
  color: var(--project-ink);
}

/* "Welcome to Cambria." highlight block */
.welcome-card-wrap {
  position: relative;
}

.welcome-card-wrap::before {
  content: "";
  position: absolute;
  inset: -14px -18px;
  border-radius: calc(var(--project-soft-rect-radius) + 16px);
  background:
    radial-gradient(70% 62% at 50% 48%, rgba(255, 220, 136, 0.11) 0%, rgba(255, 220, 136, 0.04) 42%, rgba(255, 220, 136, 0) 76%),
    radial-gradient(42% 34% at 52% 44%, rgba(255, 241, 206, 0.08) 0%, rgba(255, 241, 206, 0) 72%),
    linear-gradient(102deg, rgba(255, 255, 255, 0) 30%, rgba(255, 246, 225, 0.08) 47%, rgba(255, 255, 255, 0) 63%);
  filter: blur(18px);
  opacity: 0.56;
  pointer-events: none;
  z-index: 0;
}

.welcome-card {
  position: relative;
  z-index: 1;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--project-soft-rect-radius);
  border: 1px solid rgba(255, 255, 255, 0.48);
  background:
    radial-gradient(72% 84% at 50% 42%, rgba(255, 244, 224, 0.13) 0%, rgba(255, 244, 224, 0) 68%),
    radial-gradient(125% 150% at 10% 8%, rgba(255, 219, 148, 0.26) 0%, rgba(255, 219, 148, 0.0) 52%),
    radial-gradient(135% 120% at 92% 20%, rgba(255, 245, 216, 0.22) 0%, rgba(255, 245, 216, 0.0) 58%),
    radial-gradient(120% 150% at 48% 118%, rgba(208, 167, 120, 0.10) 0%, rgba(208, 167, 120, 0.0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(250, 246, 239, 0.62) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 10px 22px rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(173, 141, 110, 0.08),
    0 12px 28px rgba(17, 17, 17, 0.08),
    0 0 18px rgba(255, 215, 128, 0.07),
    0 0 36px rgba(255, 221, 156, 0.03);
  backdrop-filter: blur(10px) saturate(1.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
  overflow: hidden;
}

.welcome-card::before,
.welcome-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.welcome-card::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.10) 42%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(80% 120% at 18% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.0) 58%),
    radial-gradient(42% 52% at 14% 22%, rgba(255, 229, 181, 0.18) 0%, rgba(255, 229, 181, 0.0) 72%),
    linear-gradient(104deg, rgba(255, 255, 255, 0) 34%, rgba(255, 247, 229, 0.11) 46%, rgba(255, 255, 255, 0) 58%);
  opacity: 0.88;
}

.welcome-card::after {
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.10) 0%, rgba(255, 248, 236, 0) 100%),
    radial-gradient(78% 90% at 84% 18%, rgba(255, 244, 221, 0.12) 0%, rgba(255, 244, 221, 0.0) 72%);
  box-shadow:
    inset 0 0 18px rgba(255, 238, 207, 0.10),
    inset 0 -10px 18px rgba(118, 87, 56, 0.035);
  opacity: 0.96;
}

.welcome-line {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: "Alegreya SC", "Alegreya", serif;
  font-size: 1.2rem;
  color: var(--project-ink);
  letter-spacing: 0.02em;
  transform: translateZ(0);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.30),
    0 0 8px rgba(255, 244, 225, 0.14),
    0 2px 8px rgba(81, 54, 24, 0.07);
}

.welcome-line::before,
.welcome-line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.welcome-line::before {
  color: rgba(255, 225, 168, 0.56);
  opacity: 0.78;
  transform: translate(0.016em, -0.01em) scale(1.002);
  filter: blur(6px);
  mix-blend-mode: screen;
  text-shadow:
    0 0 10px rgba(255, 228, 178, 0.24),
    0 0 22px rgba(255, 211, 129, 0.18);
}

.welcome-line::after {
  color: rgba(191, 221, 255, 0.24);
  opacity: 0.62;
  transform: translate(-0.018em, 0.016em);
  filter: blur(4px);
  mix-blend-mode: screen;
  text-shadow:
    0 0 8px rgba(208, 230, 255, 0.16),
    0 0 16px rgba(188, 214, 255, 0.12);
}

.welcome-actions {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
}

.welcome-link {
  display: inline-block;
  font-weight: 600;
  color: var(--project-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  transition: border-color 120ms ease, opacity 120ms ease;
}
.welcome-link:hover {
  border-bottom-color: rgba(0, 0, 0, 0.55);
  opacity: 0.95;
}
