/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #39546d;
  --primary-hover: #283f54;
  --secondary-color: #567b89;
  --accent-color: #638d96;
  --text-primary: #13273e;
  --text-secondary: #39546d;
  --text-light: #567b89;
  --background-primary: #f5f9fb;
  --background-secondary: #e8f0f4;
  --background-accent: #dce8ef;
  --border-color: #bdd0db;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:
    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #638d96 0%, #39546d 100%);
  --gradient-accent: linear-gradient(135deg, #567b89 0%, #13273e 100%);
  --gradient-subtle: linear-gradient(120deg, #f5f9fb 0%, #dce8ef 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Manrope",
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--primary-color);
  color: #fff;
  padding: 0.625rem 0.875rem;
  border-radius: 10px;
  text-decoration: none;
  z-index: 2000;
}

.skip-link:focus-visible {
  top: 1rem;
}

/* Modern Button Styles */
.button {
  border-radius: var(--border-radius) !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.button.is-dark {
  background: var(--primary-color) !important;
  border: none !important;
  color: white !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-hover) !important;
}

.button.is-dark:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.footer .icon-link {
  font-size: 25px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer .icon-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.link-block a {
  margin: 8px 4px;
}

.dnerf {
  font-variant: small-caps;
}

/* Hero Section Modernization */
.hero {
  position: relative;
  overflow: hidden;
}

.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.hero-body {
  padding: 4rem 1.5rem;
}

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.teaser {
  font-family: "Manrope", sans-serif;
}

/* Publication Content Styling */
.publication-title {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  margin-bottom: 2rem !important;
  line-height: 1.1 !important;
}

.publication-banner {
  max-height: 70vh;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
}

.publication-header .hero-body {
  padding: 6rem 1.5rem 4rem;
}

.publication-authors {
  font-family: "Manrope", sans-serif !important;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.publication-venue {
  color: var(--text-secondary);
  width: fit-content;
  font-weight: 600;
  background: var(--background-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  display: inline-block;
}

.publication-awards {
  color: #ef4444;
  width: fit-content;
  font-weight: 700;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid #ef4444;
  margin-top: 1rem;
}

.publication-authors a {
  color: var(--text-primary) !important;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.publication-authors a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gradient-accent);
  transition: var(--transition);
}

.publication-authors a:hover::after {
  width: 100%;
}

.publication-authors a:hover {
  color: var(--primary-color) !important;
}

.publication-authors sup {
  color: var(--accent-color);
  font-weight: 700;
}

.author-block {
  display: inline-block;
  margin-right: 0.5rem;
}

.publication-banner img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.publication-banner img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Modern Video and Carousel Styling */
.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: var(--border-radius-lg) !important;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

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

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
}

.publication-body img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.publication-body img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.results-carousel {
  overflow: hidden;
  padding: 1rem 0;
}

.results-carousel .item {
  margin: 1rem;
  overflow: hidden;
  padding: 1.5rem;
  font-size: 0;
  background: var(--background-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.results-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.results-carousel .item img,
.results-carousel video {
  margin: 0;
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
}

.results-carousel .subtitle {
  font-size: 1rem !important;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 500;
}

/* Pagination and Misc Improvements */
.slider-pagination .slider-page {
  background: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

.slider-pagination .slider-page.is-active {
  background: var(--primary-hover);
  transform: scale(1.2);
}

.eql-cntrb {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

/* Section Titles */
.title.is-3 {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-bottom: 2rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.title.is-3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* Content Improvements */
.content.has-text-justified {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

/* Dataset sections */
.dataset-section {
  padding-top: 2rem;
}

.dataset-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.dataset-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem !important;
}

.dataset-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dataset-fullscreen-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dataset-fullscreen-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.dataset-card:fullscreen {
  background: #fff;
  padding: 1rem;
  height: 100dvh;
  width: 100dvw;
  border: 0;
  border-radius: 0;
  overscroll-behavior: contain;
}

.dataset-card:fullscreen .dataset-table-wrap {
  max-height: 86vh;
}

.dataset-card:fullscreen .dataset-table {
  min-width: 100%;
  font-size: 0.82rem;
}

.dataset-card:-webkit-full-screen {
  background: #fff;
  padding: 1rem;
  height: 100dvh;
  width: 100dvw;
  border: 0;
  border-radius: 0;
  overscroll-behavior: contain;
}

.dataset-card:-webkit-full-screen .dataset-table-wrap {
  max-height: 86vh;
}

.dataset-card:-webkit-full-screen .dataset-table {
  min-width: 100%;
  font-size: 0.82rem;
}

.dataset-title i {
  color: var(--primary-color);
}

.dataset-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.dataset-table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.74rem;
  min-width: 1320px;
  line-height: 1.35;
  table-layout: fixed;
}

.dataset-card .dataset-title,
.dataset-card .dataset-note {
  justify-content: center;
  text-align: center;
}

.dataset-table th {
  background: var(--background-accent);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 4;
  text-align: center !important;
}

.dataset-table th,
.dataset-table td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  vertical-align: top;
  min-width: 76px;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dataset-table td:first-child,
.dataset-table th:first-child {
  min-width: 120px;
  max-width: 120px;
}

.dataset-table td:nth-child(2),
.dataset-table th:nth-child(2) {
  min-width: 170px;
  max-width: 170px;
}

.dataset-table td:nth-child(3),
.dataset-table th:nth-child(3) {
  min-width: 68px;
  max-width: 68px;
}

.dataset-table td:nth-child(4),
.dataset-table td:nth-child(5),
.dataset-table td:nth-child(6),
.dataset-table td:nth-child(7) {
  min-width: 140px;
  max-width: 140px;
}

.dataset-table td:nth-child(8),
.dataset-table td:nth-child(9),
.dataset-table td:nth-child(10),
.dataset-table td:nth-child(11),
.dataset-table td:nth-child(12),
.dataset-table td:nth-child(13) {
  min-width: 220px;
  max-width: 220px;
}

.dataset-table td:nth-child(14) {
  min-width: 110px;
  max-width: 110px;
}

.dataset-table th:nth-child(8),
.dataset-table th:nth-child(9),
.dataset-table th:nth-child(10) {
  white-space: nowrap;
}

.dataset-table td:nth-child(15) {
  min-width: 150px;
  max-width: 150px;
}

.dataset-table td:nth-child(16) {
  min-width: 95px;
  max-width: 95px;
  text-align: center;
}

.dataset-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.dataset-table td:nth-child(3),
.dataset-table td:nth-child(14),
.dataset-table td:nth-child(16) {
  text-align: center;
}

.cell-preview-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cell-see-more {
  margin-top: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-color);
  text-decoration: underline;
  font-size: 0.72rem;
  cursor: pointer;
}

.dataset-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  overscroll-behavior: contain;
}

.dataset-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(7 20 41 / 55%);
}

.dataset-modal-card {
  position: relative;
  margin: 8vh auto;
  width: min(860px, calc(100% - 2rem));
  max-height: 82vh;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dataset-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--background-accent);
  border-bottom: 1px solid var(--border-color);
}

.dataset-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.dataset-modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.dataset-modal-close:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.dataset-modal-content {
  padding: 1rem;
  max-height: calc(82vh - 56px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}

.dataset-submit-btn {
  gap: 0.55rem;
}

.submit-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #fff;
  border-radius: 50%;
}

.dataset-submit-btn.is-loading .submit-spinner {
  display: inline-block;
  animation: submit-spinner 0.8s linear infinite;
}

@keyframes submit-spinner {
  to {
    transform: rotate(360deg);
  }
}

.dataset-note {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.dataset-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.policy-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.policy-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

.policy-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
}

.dataset-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.93rem;
}

.required {
  color: #d92d20;
}

.dataset-form input[type="text"],
.dataset-form input[type="email"],
.dataset-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  margin-bottom: 0.7rem;
  background: #fff;
  color: var(--text-primary);
}

.dataset-form input:focus-visible,
.dataset-form textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-color) 45%, white);
  border-color: var(--accent-color);
}

.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0.45rem !important;
}

.dataset-success {
  margin-top: 0.9rem;
  border: 1px solid #a7cfb0;
  background: #eaf8ed;
  color: #1f6a34;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dataset-error {
  margin-top: 0.9rem;
  border: 1px solid #f2b8b5;
  background: #fff1f0;
  color: #a13a35;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dataset-success[hidden],
.dataset-error[hidden] {
  display: none !important;
}

/* Footer Improvements */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* BibTeX Styling */
pre {
  background: var(--background-accent) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

code {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  font-family:
    "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace !important;
}

/* BibTeX Section Improvements */
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: #10b981;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* More Works Dropdown */
.more-works-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.more-works-btn {
  background: var(--background-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Manrope", sans-serif;
}

.more-works-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.more-works-btn .dropdown-arrow {
  transition: var(--transition);
  font-size: 0.8rem;
}

.more-works-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  max-height: 70vh;
  overflow-y: auto;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

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

.works-list {
  padding: 1rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.work-item:hover {
  background: var(--background-accent);
  transform: translateX(4px);
}

.work-info h5 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.work-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.work-venue {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

.work-item .fas {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Mobile Responsive Improvements */
@media screen and (max-width: 768px) {
  .hero-body {
    padding: 2rem 1rem;
  }

  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }

  .publication-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
  }

  .publication-authors {
    font-size: 1rem !important;
  }

  .button {
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
    padding: 0.75rem 1rem !important;
  }

  .more-works-container {
    bottom: 2rem;
    right: 1rem;
    top: auto;
  }

  .more-works-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .more-works-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: calc(100% + 0.5rem);
    top: auto;
  }

  .results-carousel .item {
    margin: 0.5rem;
    padding: 1rem;
  }

  .teaser .hero-body {
    padding: 1rem;
  }

  .content.has-text-justified {
    font-size: 1rem;
  }

  .dataset-access-grid {
    grid-template-columns: 1fr;
  }

  .dataset-card:fullscreen,
  .dataset-card:-webkit-full-screen {
    padding: max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .dataset-card:fullscreen .dataset-title-row,
  .dataset-card:-webkit-full-screen .dataset-title-row {
    min-height: 2.75rem;
    margin-bottom: 0.5rem;
  }

  .dataset-card:fullscreen .dataset-title,
  .dataset-card:-webkit-full-screen .dataset-title {
    font-size: 1.35rem !important;
    margin-bottom: 0.4rem !important;
  }

  .dataset-card:fullscreen .dataset-table-wrap,
  .dataset-card:-webkit-full-screen .dataset-table-wrap {
    max-height: calc(100dvh - 4.75rem);
  }
}

@media screen and (max-width: 480px) {
  .publication-title {
    font-size: 2rem !important;
  }

  .hero-body {
    padding: 1.5rem 0.75rem;
  }

  .more-works-container {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
  }

  .more-works-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .more-works-dropdown {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: calc(100vw - 2rem);
    max-width: 90vw;
  }

  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet Responsive */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-body {
    padding: 3rem 2rem;
  }

  .publication-header .hero-body {
    padding: 4rem 2rem 3rem;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section {
  animation: fadeInUp 0.6s ease-out;
}

/* Improved focus states for accessibility */
.button:focus-visible,
.related-works-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .more-works-container {
    display: none;
  }

  .hero,
  .section {
    animation: none;
  }

  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}

/* Research-instrument visual system */
:root {
  --ink: #0e2737;
  --slate: #365160;
  --muted: #566d75;
  --paper: #f5f8f6;
  --mist: #e3eff0;
  --cyan: #087f8c;
  --cyan-deep: #05616d;
  --line: #c5d7d7;
  --primary-color: var(--ink);
  --primary-hover: #061b29;
  --text-primary: var(--ink);
  --text-secondary: var(--slate);
  --text-light: var(--muted);
  --background-primary: var(--paper);
  --background-secondary: var(--mist);
  --background-accent: #d7e8e8;
  --border-color: var(--line);
  --border-radius: 6px;
  --border-radius-lg: 10px;
}

html {
  scroll-padding-top: 5rem;
}
section[id],
h2[id],
h3[id] {
  scroll-margin-top: 5rem;
}
body {
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
}
a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(8 127 140 / 18%);
}
a {
  color: var(--cyan-deep);
}
a:hover {
  color: var(--ink);
}

.site-masthead {
  background: rgb(245 248 246 / 94%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.masthead-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  color: var(--ink);
  font:
    700 1.15rem/1 "DM Mono",
    monospace;
  letter-spacing: -0.06em;
  text-decoration: none;
}
.wordmark span {
  color: var(--cyan);
  margin-left: 0.15rem;
}
.site-masthead nav {
  display: flex;
  gap: 1.25rem;
}
.site-masthead nav a {
  color: var(--slate);
  font:
    500 0.76rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.025em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-masthead nav a:hover {
  color: var(--cyan-deep);
}

.research-hero {
  background: var(--paper);
}
.research-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18rem;
  background: linear-gradient(
    90deg,
    transparent 0 7%,
    rgb(8 127 140 / 8%) 7.1% 7.5%,
    transparent 7.6% 92.5%,
    rgb(8 127 140 / 8%) 92.6% 93%,
    transparent 93.1%
  );
  pointer-events: none;
}
.research-hero .hero-body {
  padding: clamp(4.5rem, 10vw, 8rem) 1.5rem 3.5rem;
}
.research-kicker {
  color: var(--cyan-deep);
  font:
    500 0.75rem/1.4 "DM Mono",
    monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.publication-title {
  font-family: "Fraunces", Georgia, serif !important;
  font-size: clamp(2.5rem, 5.8vw, 5.4rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.065em;
  line-height: 0.98 !important;
  margin: 0 auto 2rem !important;
  max-width: 17ch;
  text-wrap: balance;
}
.publication-authors {
  max-width: 58rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.98rem !important;
  line-height: 1.65;
}
.publication-authors:last-of-type {
  color: var(--muted);
  font-size: 0.83rem !important;
  max-width: 67rem;
}
.publication-authors a {
  text-decoration: underline;
  text-decoration-color: rgb(8 127 140 / 35%);
  text-underline-offset: 0.18em;
}
.publication-links {
  margin-top: 1.9rem;
}
.publication-links .button {
  min-height: 44px;
}
.github-icon {
  width: 1em;
  height: 1em;
}
.doi-icon {
  font:
    700 0.72em/1 "DM Mono",
    monospace;
  letter-spacing: -0.05em;
}
.button.is-dark {
  background: var(--ink) !important;
  border: 1px solid var(--ink) !important;
  border-radius: 5px !important;
  box-shadow: none;
  font:
    600 0.8rem/1 "DM Sans",
    sans-serif;
  letter-spacing: 0.01em;
}
.button.is-dark:hover {
  background: var(--cyan-deep) !important;
  border-color: var(--cyan-deep) !important;
  box-shadow: 0 8px 18px rgb(14 39 55 / 15%);
}
.research-signal {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 3.75rem auto 0;
  max-width: 47rem;
}
.research-signal div {
  border-right: 1px solid var(--line);
  padding: 1rem 0.75rem 0.25rem;
}
.research-signal div:last-child {
  border-right: 0;
}
.research-signal dt {
  color: var(--muted);
  font:
    500 0.72rem/1.2 "DM Mono",
    monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.research-signal dd {
  color: var(--ink);
  font:
    600 clamp(1.6rem, 3vw, 2.35rem)/1 "Fraunces",
    serif;
  margin: 0.5rem 0 0;
}
.research-signal dd,
.dataset-table {
  font-variant-numeric: tabular-nums;
}

.hero.is-light {
  background: var(--mist);
  border: 0;
}
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 1.5rem;
}
.title.is-3,
.bibtex-header .title {
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif !important;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 600 !important;
  letter-spacing: -0.04em;
  padding: 0;
  text-wrap: balance;
}
.title.is-3::after {
  background: var(--cyan);
  height: 4px;
  left: 50%;
  width: 2.4rem;
}
.content.has-text-justified {
  color: var(--slate);
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  line-height: 1.8;
}

.dataset-section {
  background: var(--paper);
}
.dataset-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgb(14 39 55 / 6%);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.dataset-card .dataset-title,
.dataset-card .dataset-note {
  justify-content: initial;
  text-align: left;
}
.dataset-title-row {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.dataset-title-row .dataset-title {
  border: 0;
  margin-bottom: 0.8rem !important;
}
.dataset-title-row .dataset-title::after {
  display: none;
}
.dataset-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.dataset-request-link {
  align-items: center;
  background: var(--cyan-deep);
  border: 1px solid var(--cyan-deep);
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font:
    600 0.8rem/1 "DM Sans",
    sans-serif;
  min-height: 38px;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  white-space: nowrap;
}
.dataset-request-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.dataset-fullscreen-btn,
.copy-bibtex-btn {
  border-radius: 4px;
  font-family: "DM Sans", sans-serif;
}
.dataset-table-wrap {
  border-radius: 4px;
}
.dataset-card .dataset-table thead th {
  background-color: var(--ink) !important;
  color: #fff !important;
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.015em;
}
.dataset-table tbody tr:nth-child(even) td {
  background: #f4f8f7;
}
.dataset-table tbody tr:hover td {
  background: #e7f5f3;
}
.cell-see-more {
  color: var(--cyan-deep);
  font-weight: 600;
}
.policy-list li::before {
  content: "→";
  color: var(--cyan-deep);
}
.dataset-form input[type="text"],
.dataset-form input[type="email"],
.dataset-form textarea {
  border-radius: 4px;
}
.dataset-form input:focus-visible,
.dataset-form textarea:focus-visible {
  outline: 3px solid rgb(8 127 140 / 30%);
  outline-offset: 2px;
  border-color: var(--cyan);
}
.check-row input {
  margin-top: 0.3rem;
  accent-color: var(--cyan-deep);
}
.dataset-modal-card {
  border-radius: 8px;
}
.dataset-modal-header {
  background: var(--mist);
}

.bibtex-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
#bibtex-code {
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 0.82rem;
}
.footer {
  background: var(--ink);
  border: 0;
}
.footer .content,
.footer a {
  color: #dce8e8;
}
.footer a:hover {
  color: #fff;
}
.copy-bibtex-btn.copy-failed {
  background: #a13a35;
}

:is(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
@media screen and (max-width: 768px) {
  .masthead-inner {
    min-height: 4rem;
    padding: 0 1rem;
  }
  .site-masthead nav {
    gap: 0.7rem;
  }
  .site-masthead nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 1rem 0.15rem;
    font-size: 0.8rem;
  }
  .research-hero .hero-body {
    padding: 4.25rem 1.25rem 2.5rem;
  }
  .research-hero .publication-links {
    margin-top: 3rem;
  }
  .research-signal {
    margin-top: 2.5rem;
  }
  .research-signal div {
    padding: 0.85rem 0.4rem 0.15rem;
  }
  .research-signal dt {
    font-size: 0.68rem;
  }
  .research-signal dd {
    font-size: 1.35rem;
  }
}
@media screen and (max-width: 600px) {
  .dataset-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .dataset-actions {
    margin-bottom: 0.8rem;
  }
}

/* The content should settle immediately; a research page benefits from stillness. */
.hero,
.section {
  animation: none;
}
