:root {
  --green: #0d7f5f;
  --green-deep: #075a45;
  --green-soft: #eaf7f1;
  --blue: #183653;
  --heading: #17334d;
  --text: #3e4650;
  --muted: #727b84;
  --border: #dfe5e8;
  --soft: #f6f8f9;
  --white: #fff;
  --dark: #15202b;
  --shadow: 0 10px 34px rgba(24, 54, 83, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { color: #1671a7; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }

.wide-container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.content-container { width: min(940px, calc(100% - 36px)); margin: 0 auto; }
.text-container { width: min(800px, calc(100% - 36px)); margin: 0 auto; }
.has-text-centered { text-align: center; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(223,229,232,.85);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 58px; }
.site-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--heading); font-size: 14px; font-weight: 700; }
.site-brand:hover { text-decoration: none; }
.site-brand img { width: 28px; height: 28px; object-fit: contain; }
.topbar nav { display: flex; gap: 20px; align-items: center; }
.topbar nav a { color: #58636d; font-size: 13px; font-weight: 600; }
.topbar nav a:hover { color: var(--green); text-decoration: none; }

.hero { padding: 54px 0 22px; }
h1 {
  margin: 0 auto 18px;
  color: var(--heading);
  font-size: clamp(40px, 5.8vw, 68px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -2.5px;
}
.authors { margin: 18px 0 4px; font-size: 20px; }
.authors sup, .affiliations sup { margin-left: 2px; font-size: .62em; }
.affiliations { margin: 2px 0 0; font-size: 18px; }
.venue { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  min-height: 100px;
  margin: 16px auto 4px;
}
.institution-logo { display: flex; align-items: center; justify-content: center; color: var(--heading); }
.institution-logo:hover { text-decoration: none; }
.bilkent-logo img { width: 82px; height: 82px; object-fit: contain; }
.neuravision-logo { gap: 10px; font-weight: 700; font-size: 18px; }
.neuravision-logo img { width: 66px; height: 66px; object-fit: contain; }
.bmvc-logo img { width: 172px; height: 58px; object-fit: contain; }

.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--dark);
  font-size: 15px;
  font-weight: 500;
}
.pill:hover { color: #fff; background: #222; text-decoration: none; }
.pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-muted { background: #9aa0a6; cursor: default; }
.pill-muted:hover { background: #9aa0a6; }

.section { padding: 48px 0; }
.section-tight { padding: 28px 0 36px; }
.eyebrow { display: inline-block; margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-title { margin: 0 0 22px; color: var(--heading); font-size: clamp(30px, 4vw, 40px); font-weight: 600; line-height: 1.18; letter-spacing: -1.1px; }
.section-intro { max-width: 820px; margin: -8px 0 24px; color: #56616b; }
.section-heading-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; margin-bottom: 22px; }
.section-heading-row .section-title { margin-bottom: 0; }
.section-kicker { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.video-section { padding-top: 36px; }
.video-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #d7dee2;
  border-radius: 18px;
  background: #0b1218;
  box-shadow: 0 18px 50px rgba(10, 28, 42, .14);
}
.video-shell iframe { width: 100%; height: 100%; border: 0; }
.video-local-fallback {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: #0b1218;
}
.video-local-fallback > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .76;
  transition: transform .25s ease, opacity .25s ease;
}
.video-local-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,15,21,.05) 35%, rgba(7,15,21,.86) 100%);
}
.video-local-fallback:hover > img { transform: scale(1.012); opacity: .84; }
.video-play-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 52px;
  border-radius: 14px;
  background: #ff0033;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translate(-50%, -50%);
  font-size: 24px;
  line-height: 1;
  padding-left: 3px;
}
.video-local-note {
  position: absolute;
  z-index: 2;
  right: 26px;
  bottom: 22px;
  left: 26px;
}
.video-local-note strong, .video-local-note small { display: block; }
.video-local-note strong { font-size: 18px; font-weight: 700; }
.video-local-note small { margin-top: 4px; color: #d1dbe1; font-size: 12px; }
.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 30px;
  color: #d9e7ee;
  background:
    radial-gradient(circle at 22% 30%, rgba(13,127,95,.2), transparent 32%),
    radial-gradient(circle at 76% 70%, rgba(249,145,50,.14), transparent 34%),
    #0c141a;
}
.video-placeholder img { width: 88px; height: 88px; object-fit: contain; }
.video-placeholder strong, .video-placeholder span { display: block; }
.video-placeholder strong { margin-bottom: 4px; color: #fff; font-size: 20px; }
.video-placeholder span { max-width: 540px; color: #b8c7d0; font-size: 14px; }
.video-placeholder code { color: #fff; }

.teaser-figure { margin: 0 auto 12px; padding: 22px; border: 1px solid #e7ebed; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.teaser-figure img { width: 100%; }
.lead-line { max-width: 850px; margin: 12px auto 0; color: var(--text); font-size: 20px; font-weight: 400; line-height: 1.3; }
.abstract-text { text-align: justify; }
.abstract-text p { margin: 0 0 18px; }

.soft-card { border: 1px solid #e5e9eb; border-radius: 14px; background: var(--soft); }
.method-card { display: grid; grid-template-columns: 1.55fr .65fr; gap: 38px; padding: 30px; }
.method-copy p { margin: 0 0 17px; text-align: justify; }
.equation { overflow-x: auto; margin-top: 20px; padding: 18px 15px; border: 1px solid #dfe4e6; border-radius: 9px; background: #fff; color: #303842; font-family: Georgia, "Times New Roman", serif; font-size: 18px; text-align: center; white-space: nowrap; }
.compact-equation { margin: 0 0 18px; font-size: 17px; }
.method-notes { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.method-notes div { padding: 13px 0; border-bottom: 1px solid #dde2e5; }
.method-notes div:last-child { border-bottom: 0; }
.method-notes strong, .method-notes span { display: block; }
.method-notes strong { color: var(--heading); font-size: 18px; }
.method-notes span { color: #7b858d; font-size: 13px; }

.code-card { display: grid; grid-template-columns: 1.18fr .82fr; gap: 30px; align-items: center; margin-top: 26px; padding: 24px; }
.code-image-wrap { overflow: hidden; margin: 0; border-radius: 13px; background: #0e1012; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.code-image-wrap img { width: 100%; }
.code-copy h3, .idr-card h3 { margin: 0 0 12px; color: var(--heading); font-size: 22px; }
.code-copy p { margin: 0 0 16px; text-align: justify; }

.inference-card { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: center; margin-top: 26px; padding: 24px; background: #fff; }
.inference-card > div { min-width: 0; }
.inference-card strong { display: block; margin: 5px 0 6px; color: var(--heading); font-size: 17px; }
.inference-card p { margin: 0; color: #67717a; font-size: 13px; line-height: 1.5; }
.step-number { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.step-arrow { color: #a2acb2; font-size: 24px; }

.figure-card { margin: 0; padding: 16px; background: #fff; }
.figure-card img { width: 100%; border-radius: 8px; }
.figure-card figcaption { padding: 13px 10px 2px; text-align: center; color: #68727b; font-size: 14px; line-height: 1.45; }

.idr-card { display: grid; grid-template-columns: .92fr 1.08fr; gap: 30px; align-items: center; padding: 26px; }
.idr-card p { margin: 0 0 18px; text-align: justify; }
.idr-card img { width: 100%; border-radius: 9px; background: #fff; }
.idr-legend { display: grid; gap: 8px; }
.idr-legend span { padding: 8px 10px; border-radius: 8px; background: #fff; color: #5d6871; font-size: 13px; }
.idr-legend b { color: var(--green-deep); }

.results-carousel {
  padding: 20px;
  border: 1px solid #dfe5e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.carousel-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 13px;
  background: #f2f5f6;
}
.carousel-tab {
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #65717a;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.carousel-tab:hover { color: var(--heading); background: #fff; }
.carousel-tab[aria-selected="true"] {
  color: #fff;
  background: var(--heading);
  box-shadow: 0 5px 14px rgba(23, 51, 77, .14);
}
.carousel-frame {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}
.carousel-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid #d8e0e3;
  border-radius: 50%;
  color: var(--heading);
  background: #fff;
  cursor: pointer;
  font-size: 19px;
  box-shadow: 0 5px 16px rgba(24, 54, 83, .06);
}
.carousel-arrow:hover { border-color: var(--green); color: var(--green); }
.carousel-stage { min-width: 0; }
.result-panel { animation: panel-in .22s ease; }
@keyframes panel-in { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.result-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-end;
  margin: 0 0 12px;
}
.result-panel-head h3 { margin: 2px 0 0; color: var(--heading); font-size: 21px; line-height: 1.2; }
.result-panel-head p { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.result-dataset {
  display: inline-block;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dataset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.dataset-tab {
  padding: 7px 11px;
  border: 1px solid #dbe3e6;
  border-radius: 999px;
  color: #67727a;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.dataset-tab:hover { border-color: #b9c8c2; color: var(--green-deep); }
.dataset-tab.active {
  border-color: #b9d8cd;
  color: var(--green-deep);
  background: var(--green-soft);
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid #e2e7e9;
  border-radius: 12px;
  background: #fff;
}
.results-table {
  width: 100%;
  min-width: 580px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.35;
}
.results-table th,
.results-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e8ecee;
  text-align: center;
  white-space: normal;
  vertical-align: middle;
}
.results-table thead th {
  color: #41505c;
  background: #f4f7f8;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
}
.results-table thead th:first-child { border-top-left-radius: 11px; }
.results-table thead th:last-child { border-top-right-radius: 11px; }
.results-table tbody th {
  width: 26%;
  color: #3f4c56;
  background: #fff;
  text-align: left;
  font-weight: 600;
}
.results-table tbody tr:nth-child(even):not(.ours) th,
.results-table tbody tr:nth-child(even):not(.ours) td { background: #fbfcfc; }
.results-table tbody tr:last-child th,
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover:not(.ours) th,
.results-table tbody tr:hover:not(.ours) td { background: #f7faf9; }
.results-table tr.ours th,
.results-table tr.ours td {
  color: #0d5d46;
  background: #eaf7f1;
  font-weight: 800;
  border-bottom-color: #d5ecdf;
}
.results-table tr.ours th { box-shadow: inset 4px 0 0 var(--green); }
.carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 0 2px;
}
.carousel-dots { display: flex; gap: 7px; }
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ccd5d9;
  cursor: pointer;
}
.carousel-dot.active { width: 22px; border-radius: 999px; background: var(--green); }
.carousel-counter { color: var(--muted); font-size: 12px; font-weight: 650; }

.takeaway-card {
  padding: 34px 36px;
  border: 1px solid #dbe7e1;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3fbf7 0%, #fff 72%);
}
.takeaway-card h2 {
  max-width: 840px;
  margin: 0 0 13px;
  color: var(--heading);
  font-size: clamp(27px, 3.4vw, 36px);
  line-height: 1.18;
  letter-spacing: -.8px;
}
.takeaway-lead {
  max-width: 850px;
  margin: 0;
  color: #56656a;
  font-size: 16px;
  line-height: 1.72;
}
.takeaway-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.takeaway-points div {
  padding: 16px 17px;
  border: 1px solid #e2ebe6;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
}
.takeaway-points strong { display: block; margin-bottom: 5px; color: var(--green-deep); font-size: 14px; }
.takeaway-points span { display: block; color: #66736d; font-size: 13px; line-height: 1.55; }
.takeaway-limit {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #dfeae4;
  color: #6a746f;
  font-size: 13px;
}
.takeaway-limit strong { color: var(--heading); }

.bibtex-section { padding-top: 4px; }
.bibtex-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bibtex-heading button { padding: 8px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--dark); cursor: pointer; }
.bibtex-heading button:hover { background: #222; }
.bibtex { margin: 0; padding: 22px; overflow-x: auto; border-radius: 10px; background: var(--soft); color: #333; font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

footer { margin-top: 20px; padding: 28px 0 38px; border-top: 1px solid #edf0f1; color: #7a838a; font-size: 13px; }
.footer-inner { display: flex; justify-content: center; align-items: center; gap: 8px; }
.footer-inner img { width: 22px; height: 22px; object-fit: contain; }
.footer-inner p { margin: 0; }
.toast { position: fixed; right: 18px; bottom: 18px; padding: 10px 15px; border-radius: 8px; color: white; background: #222; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(13,127,95,.32); outline-offset: 3px; }

@media (max-width: 820px) {
  .topbar nav { display: none; }
  .section-heading-row { grid-template-columns: 1fr; gap: 8px; }
  .section-kicker { max-width: 680px; }
  .method-card, .code-card, .idr-card { grid-template-columns: 1fr; }
  .method-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .method-notes div { padding: 11px; border: 0; border-radius: 8px; background: #fff; }
  .inference-card { grid-template-columns: 1fr; }
  .step-arrow { transform: rotate(90deg); justify-self: center; }
  .carousel-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carousel-frame { grid-template-columns: 1fr; }
  .carousel-arrow { display: none; }
  .takeaway-points { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero { padding-top: 34px; }
  .desktop-break { display: none; }
  h1 { letter-spacing: -1.4px; }
  .authors { font-size: 17px; }
  .affiliations { font-size: 15px; }
  .logo-row { flex-wrap: wrap; gap: 18px 28px; }
  .bilkent-logo img { width: 68px; height: 68px; }
  .neuravision-logo img { width: 55px; height: 55px; }
  .neuravision-logo { font-size: 16px; }
  .bmvc-logo img { width: 150px; }
  .resource-links { gap: 8px; }
  .pill { min-height: 38px; padding: 6px 13px; font-size: 14px; }
  .video-placeholder { flex-direction: column; text-align: center; }
  .video-placeholder img { width: 70px; height: 70px; }
  .teaser-figure { padding: 10px; }
  .section { padding: 36px 0; }
  .method-card, .code-card, .idr-card { padding: 20px; }
  .method-notes { grid-template-columns: 1fr; }
  .equation { font-size: 16px; }
  .takeaway-card { padding: 24px 22px; }
  .takeaway-card h2 { font-size: 28px; }
  .results-carousel { padding: 12px; }
  .carousel-tabs { grid-template-columns: 1fr 1fr; }
  .carousel-tab { padding: 9px 8px; font-size: 11.5px; }
  .dataset-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .dataset-tab { flex: 0 0 auto; }
  .results-table { min-width: 520px; font-size: 12px; }
  .result-panel-head { display: block; }
  .result-panel-head p { margin-top: 5px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
