
:root {
  --color-primary: #111111;
  --color-secondary: #f5f5f5;
  --color-accent: #000000;
  --color-accent-2: #333333;
  --color-text: #202020;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f6f6;
  --color-surface: #ffffff;
  --color-border: #e2e2e2;
  --font-base: "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 0.9rem;
  --font-size-large: 1.2rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;
  --font-size-huge: 3rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 8px;
  --max-width-content: 1200px;
  --header-height: 58px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --shadow-small: 0 1px 2px rgba(17, 24, 28, 0.06);
  --shadow-medium: 0 10px 24px rgba(17, 24, 28, 0.08);
  --shadow-large: 0 18px 48px rgba(17, 24, 28, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-medium);
}

a:hover {
  color: var(--color-accent);
}

/* Keep pill button links white on hover (override global a:hover) */
.profile-link,
.profile-link:visited { color:#fff; }
.profile-link:hover,
.profile-link:focus { color:#fff; }

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-base);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.text-center {
  text-align: center;
}

/* Header */
.header {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 226, 226, 0.9);
  box-shadow: none;
  position: fixed;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  box-sizing: border-box;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0.4rem var(--spacing-md);
  height: 100%;
  align-items: center;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;
  grid-column: 1;
  letter-spacing: 0;
  color: var(--color-primary);
}

.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 2;
  width: auto;
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.top-nav ul li a,
.nav-btn {
  text-decoration: none;
  border: none;
  background: none;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  position: relative;
  padding: 0.45rem 0.75rem;
  transition: color var(--transition-medium), background var(--transition-medium);
  white-space: nowrap;
  border-radius: var(--border-radius-sm);
  letter-spacing: 0;
}

.top-nav ul li a::after,
.nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-medium);
}

.top-nav ul li a:hover::after,
.nav-btn:hover::after,
.top-nav ul li a.active::after {
  width: 75%;
  height: 3px;
}

.top-nav ul li a:hover,
.top-nav ul li a.active,
.nav-btn:hover {
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.05);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  grid-column: 3;
}

.nav-right .search-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--border-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-medium), background var(--transition-medium), border-color var(--transition-medium);
}

.nav-right .search-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  background: var(--color-primary);
  position: absolute;
  right: -6px;
  bottom: -3px;
  transform: rotate(45deg);
  transform-origin: center;
}

.progress-container {
  width: 100%;
  height: 2px;
  background: transparent;
  position: absolute;
  bottom: 0;
  left: 0;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  width: 0;
  transition: width 0.3s;
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), visibility 0s linear var(--transition-fast);
  overflow-y: auto;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.overlay-open {
  overflow: hidden;
}

.blur-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity var(--transition-medium), backdrop-filter var(--transition-medium);
  cursor: pointer;
}

.overlay.active .blur-bg {
  opacity: 1;
  backdrop-filter: blur(8px);
}

.overlay-content {
  position: absolute;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: var(--max-width-content);
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md);
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.overlay.active .overlay-content {
  opacity: 1;
}

.overlay-left, .overlay-right {
  width: 45%;
}

.overlay-left h3, .overlay-right h3 {
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-large);
}

.overlay-left ul li, .overlay-right ul li {
  margin: var(--spacing-xs) 0;
}

.overlay-left ul li a, .overlay-right ul li a {
  color: #fff;
  text-decoration: none;
  transition: opacity var(--transition-medium);
}

.overlay-left ul li a:hover, .overlay-right ul li a:hover {
  opacity: 0.8;
}

.search-content {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.overlay.active .search-content {
  opacity: 1;
}

.search-container {
  width: 100%;
  padding: var(--spacing-md);
}

.search-input {
  width: 100%;
  padding: 0.5rem 0;
  font-size: 1.5rem;
  color: white;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color var(--transition-medium);
}

.search-input:focus {
  outline: none;
  border-bottom-color: white;
}

.search-results {
  margin-top: var(--spacing-md);
  display: grid;
  gap: var(--spacing-sm);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.search-result-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  color: white;
  cursor: pointer;
  display: block;
  text-decoration: none;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.search-result-item h3,
.search-result-item p {
  overflow-wrap: anywhere;
}

.search-result-item.is-loading,
.search-result-item.is-empty {
  cursor: default;
}

.search-result-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.highlight {
  background-color: #e8e8e8;
  color: #111;
  padding: 0 2px;
  border-radius: 2px;
}

.overlay-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  font-size: 2rem;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  transition: color var(--transition-medium);
}

.overlay-close:hover {
  color: #fff;
}

.overlay-close:focus-visible,
.search-result-item:focus-visible,
.blur-bg:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Hero Carousel */
.hero-carousel {
  width: 100%;
  position: relative;
  height: 72vh;
  min-height: 560px;
  max-height: 760px;
  overflow: hidden;
  background: #111;
  margin-top: var(--header-height);
  touch-action: pan-y;
}

.carousel-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.carousel-slide .slide-content {
  color: #fff;
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.36) 42%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.02) 42%);
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04) brightness(0.92);
}

.paper-hero {
  background: #0f0f0f;
}

.paper-hero .carousel-slide::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.66) 38%, rgba(0, 0, 0, 0.12) 58%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.02) 46%);
}

.paper-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 3.5rem 4.5rem 3.5rem 50%;
  background:
    linear-gradient(90deg, #0f0f0f 0%, #151515 43%, #f6f6f6 43%, #f6f6f6 100%);
}

.paper-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: clamp(0.55rem, 1vw, 0.9rem);
  width: 100%;
  max-width: 740px;
  height: min(100%, 520px);
  min-height: 410px;
  padding: clamp(0.6rem, 1vw, 0.95rem);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.16);
  isolation: isolate;
}

.paper-collage::before {
  display: none;
}

.paper-collage::after {
  display: none;
}

.paper-collage-frame {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: var(--border-radius-md);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  appearance: none;
  cursor: zoom-in;
  font: inherit;
  padding: 0;
  pointer-events: auto;
  touch-action: manipulation;
  transform: translateZ(0);
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.42s ease,
    border-color 0.42s ease,
    opacity 0.3s ease,
    filter 0.3s ease;
}

.paper-collage-frame::before {
  display: none;
}

.paper-collage-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: var(--paper-image-position, center);
  padding: clamp(0.18rem, 0.42vw, 0.34rem);
  background: #fff;
  transform: none;
  transition: transform 0.42s ease;
}

.paper-collage:hover .paper-collage-frame:not(:hover) {
  opacity: 0.86;
  filter: contrast(0.96);
}

.paper-collage-frame:hover,
.paper-collage-frame:focus-visible {
  z-index: 10;
  transform: translateY(-5px) scale(1.035);
  border-color: rgba(17, 17, 17, 0.26);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  outline: none;
}

.paper-collage-frame:hover img,
.paper-collage-frame:focus-visible img {
  transform: none;
}

.paper-collage-frame.primary:hover,
.paper-collage-frame.primary:focus-visible {
  transform: translateY(-4px) scale(1.025);
}

.paper-collage-frame.primary {
  grid-column: 1 / 10;
  grid-row: 1 / 6;
  z-index: 5;
  border-color: rgba(17, 17, 17, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.13);
}

.paper-collage-frame.secondary {
  grid-column: 10 / 13;
  grid-row: 1 / 4;
  z-index: 3;
}

.paper-collage-frame.tertiary {
  grid-column: 1 / 6;
  grid-row: 6 / 9;
  z-index: 2;
}

.paper-collage-frame.quaternary {
  grid-column: 6 / 13;
  grid-row: 6 / 9;
  z-index: 4;
}

.paper-collage[data-image-count="1"] .paper-collage-frame.primary {
  grid-column: 1 / 13;
  grid-row: 1 / 9;
}

.paper-collage[data-image-count="2"] .paper-collage-frame.primary {
  grid-column: 1 / 13;
  grid-row: 1 / 6;
}

.paper-collage[data-image-count="2"] .paper-collage-frame.secondary {
  grid-column: 1 / 13;
  grid-row: 6 / 9;
}

.paper-collage[data-image-count="3"] .paper-collage-frame.primary {
  grid-column: 1 / 13;
  grid-row: 1 / 6;
}

.paper-collage[data-image-count="3"] .paper-collage-frame.secondary {
  grid-column: 1 / 7;
  grid-row: 6 / 9;
}

.paper-collage[data-image-count="3"] .paper-collage-frame.tertiary {
  grid-column: 7 / 13;
  grid-row: 6 / 9;
}

.paper-zoom-open {
  overflow: hidden;
}

.paper-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.paper-zoom-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.paper-zoom-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.paper-zoom-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 1040px);
  height: min(84vh, 740px);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--border-radius-md);
  background: #f8f8f8;
  box-shadow: 0 42px 100px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translate(-50%, -48%) scale(0.96);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@supports (height: 100svh) {
  .paper-zoom-dialog {
    height: min(84svh, 740px);
    max-height: calc(100svh - 2rem);
  }
}

.paper-zoom-modal.is-open .paper-zoom-dialog {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.paper-zoom-dialog.is-wide {
  height: auto;
  grid-template-rows: auto auto;
}

.paper-zoom-dialog.is-wide .paper-zoom-image-wrap {
  max-height: min(68vh, 620px);
}

.paper-zoom-dialog.is-wide .paper-zoom-close {
  top: auto;
  right: 0.8rem;
  bottom: 0.65rem;
}

.paper-zoom-image-wrap {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    linear-gradient(135deg, #ffffff 0%, #f4f4f4 100%);
}

.paper-zoom-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.paper-zoom-caption {
  margin: 0;
  min-height: 58px;
  padding: 0.95rem 4rem 1rem 1.1rem;
  border-top: 1px solid var(--color-border);
  color: #111;
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.35;
  background: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.paper-zoom-close {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow-small);
  transition: background var(--transition-medium), transform var(--transition-medium), border-color var(--transition-medium);
}

.paper-zoom-close:hover,
.paper-zoom-close:focus-visible {
  background: #fff;
  border-color: rgba(17, 17, 17, 0.34);
  transform: translateY(-1px);
  outline: none;
}

.slide-content {
  position: absolute;
  z-index: 3;
  text-align: left;
  color: #fff;
  left: max(2rem, calc((100vw - var(--max-width-content)) / 2 + 2rem));
  right: 2rem;
  bottom: 4.8rem;
  max-width: 760px;
  transform: none;
}

.slide-content h2 {
  font-size: 5.4rem;
  font-weight: 760;
  line-height: 0.98;
  margin-bottom: 1.2rem;
  letter-spacing: 0;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.paper-slide-content {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  max-width: 560px;
}

.paper-slide-content h2 {
  font-size: 2.45rem;
  font-weight: 780;
  line-height: 1.08;
  margin-bottom: 0.9rem;
  max-width: 560px;
}

.hero-paper-kicker,
.hero-paper-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.hero-paper-kicker {
  margin-bottom: 0.9rem;
}

.hero-paper-kicker span,
.hero-paper-member {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.28rem 0.52rem;
}

.hero-paper-kicker span:first-child {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.hero-paper-summary {
  max-width: 520px;
  margin: 0 0 0.95rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hero-paper-members {
  margin: 0.95rem 0 0.72rem;
}

.hero-paper-venue {
  max-width: 620px;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hero-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.86);
  padding: 0.82rem 1.05rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  color: #111;
  font-size: 0.98rem;
  font-weight: 700;
  transition: background var(--transition-medium), transform var(--transition-medium), box-shadow var(--transition-medium);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.hero-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  color: #111;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.hero-btn-container {
  display: inline-block;
  padding: 0;
  margin-top: var(--spacing-sm);
}

.carousel-indicators {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.22rem;
  z-index: 4;
  padding: 0.2rem;
}

.dot {
  position: relative;
  width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dot::before {
  content: "";
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition:
    background var(--transition-medium),
    transform var(--transition-medium),
    width var(--transition-medium);
}

.dot:hover::before,
.dot:focus-visible::before {
  background: #fff;
  transform: scaleX(1.12);
}

.dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: -7px;
  border-radius: 999px;
}

.dot.active::before {
  width: 34px;
  background: #fff;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.58);
  font-size: 1rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 4;
  border-radius: 50%;
  transition: background var(--transition-medium);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  line-height: 1;
}

.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.carousel-arrow.left {
  left: 1.2rem;
}

.carousel-arrow.right {
  right: 1.2rem;
}

.paper-hero .carousel-arrow.left,
.paper-hero .carousel-arrow.right {
  left: auto;
  right: 1.2rem;
}

.paper-hero .carousel-arrow.left {
  top: calc(50% - 28px);
}

.paper-hero .carousel-arrow.right {
  top: calc(50% + 28px);
}

.carousel-arrow > span {
  display: inline-block;
  transform: translateY(-2px);
}

/* Gallery Cards */
.small-cards-row {
  width: 90%;
  max-width: var(--max-width-content);
  margin: var(--spacing-md) auto;
  position: relative;
  overflow: hidden;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.row-header h2 {
  font-size: var(--font-size-xl);
}

.small-card {
  height: 400px;
  flex: 0 0 auto;
  width: auto;
  min-width: 160px;
  max-width: 1000px;
  overflow: visible;
  position: relative;
  cursor: pointer;
  scroll-snap-align: start;
  transition: box-shadow var(--transition-medium), transform var(--transition-medium);
  z-index: 0;
  display: flex;
  flex-direction: column;
  margin-right: 16px;
}

.small-card-image {
  height: 340px;
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-small);
  transition: box-shadow var(--transition-medium);
  display: block;
  overflow: hidden;
  background: #f2f2f2;
}

.small-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.small-card:hover {
  transform: translateY(-5px);
}

.small-card:hover .small-card-image {
  box-shadow: var(--shadow-medium);
}

.small-card:hover .small-card-image img {
  transform: scale(1.05);
}

.card-year {
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

.cards-scroll-wrapper {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 10px 5px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.cards-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.cards-scroll-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.loading {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--color-text-light);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid var(--color-text-light);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.component-placeholder {
  padding: var(--spacing-md);
  background: #f0f0f0;
  border: 1px dashed #ccc;
  margin: var(--spacing-sm) 0;
  text-align: center;
  color: #666;
}

.gallery-overflow-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.cards-scroll-wrapper.infinite-scroll {
  display: flex;
  width: fit-content;
  animation: scrollLeft 90s linear infinite;
  padding: 10px 0;
}

.cards-scroll-wrapper.infinite-scroll.is-static {
  width: 100%;
  overflow-x: auto;
  animation: none;
  scroll-snap-type: x proximity;
}

.infinite-scroll .small-card-image {
  animation: none;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 16px));
  }
}

.infinite-scroll .small-card {
  flex: 0 0 auto;
  width: auto;
  min-width: 100px;
  max-width: 400px;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
}

.infinite-scroll .small-card.featured-group-photo {
  width: min(82vw, 540px);
  min-width: 320px;
  max-width: 540px;
}

.infinite-scroll .small-card-image {
  height: 350px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.infinite-scroll .small-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-group-photo .small-card-image img {
  object-fit: contain;
}

.cards-scroll-wrapper.infinite-scroll:hover {
  animation-play-state: paused;
}

/* Footer */
.footer {
  text-align: center;
  padding: var(--spacing-md) var(--spacing-sm);
  background: #f2f2f2;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-small);
  margin-top: var(--spacing-xl);
  color: var(--color-text-light);
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.footer-logo {
  max-width: 400px;
  max-height: 150px;
  margin: 0;
  opacity: 1;
}

.footer-divider {
  width: 1px;
  height: 50px;
  background-color: #ccc;
}

.footer-text {
  text-align: center;
  margin-top: 10px;
}

.legal-link {
  color: #666;
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-left: 0.25rem;
  vertical-align: baseline;
}

.legal-link:hover {
  color: #000;
  text-decoration: underline;
}

.legal-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.legal-popup.active {
  display: block;
}

.legal-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.legal-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  overflow-y: auto;
  box-shadow: var(--shadow-large);
}

.legal-popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  transition: color var(--transition-fast);
}

.legal-popup-close:hover {
  color: #000;
}

.legal-popup h2 {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.legal-section {
  margin-bottom: 20px;
}

.legal-section h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.legal-section p {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #333;
}

.legal-section a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-frame {
  border: 0;
}

/* Profile Page */
.profile-page {
  padding: var(--spacing-md);
  padding-top: calc(var(--header-height) + var(--spacing-md));
  background: var(--color-bg);
}

.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  align-items: flex-start;
  max-width: var(--max-width-content);
  margin: 1rem auto 0;
}

.profile-image {
  flex: 1;
  max-width: 300px;
}

.profile-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
}

.profile-details {
  flex: 2;
  max-width: 600px;
  text-align: left;
}

.profile-details h1 {
  font-size: var(--font-size-xxl);
  margin-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--spacing-xs);
  letter-spacing: 0;
}

.profile-details p {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

.profile-bio h2 {
  font-size: var(--font-size-large);
  margin: var(--spacing-md) 0 var(--spacing-xs) 0;
  color: var(--color-primary);
}

.profile-bio ul {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-md);
}

.profile-bio ul li {
  margin-bottom: var(--spacing-xs);
  position: relative;
  list-style-type: disc;
}

.profile-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  flex-wrap: wrap;
}

.profile-link {
  --glow-color: rgba(0, 0, 0,0.25);
  background: var(--color-primary);
  color:#fff;
  font-size:0.85rem;
  font-weight:600;
  letter-spacing:0;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:0.6rem 1rem 0.55rem;
  border-radius: var(--border-radius-md);
  line-height:1;
  position:relative;
  border:1px solid var(--color-primary);
  box-shadow: var(--shadow-small);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

/* Type-specific glow colors */
.profile-link.scholar,
.profile-link.email,
.profile-link.linkedin,
.profile-link.publications { --glow-color:#8a8a8a; }

.profile-link:focus-visible { outline:2px solid var(--glow-color); outline-offset:2px; }

.profile-link:hover {
  transform:translateY(-2px);
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-medium);
}

.profile-link:active { transform:translateY(0); box-shadow:var(--shadow-small); }

.profile-link-icon { width:18px; height:18px; display:inline-block; object-fit:contain; filter:grayscale(1) drop-shadow(0 1px 1px rgba(0,0,0,0.5)); }

/* Inline SVG LinkedIn icon (fallback to avoid missing file on GitHub Pages) */
.profile-link-icon.linkedin-icon { /* Base64-encoded SVG to avoid hash parsing issues on GitHub Pages */
  width:18px; height:18px;
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iIzBBNjZDMiIvPjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik02LjQgOWgyLjZ2OC42SDYuNFY5Wm0xLjMtNC4zYTEuNSAxLjUgMCAxIDEgMCAzLjEgMS41IDEuNSAwIDAgMSAwLTMuMVpNMTEuMSA5aDIuNXYxLjJoLjFjLjQtLjcgMS4zLTEuNSAyLjctMS41IDIuOCAwIDMuMyAxLjggMy4zIDQuMnY0LjdoLTIuNnYtNC4yYzAtMSAwLTIuMy0xLjQtMi4zcy0xLjcgMS4xLTEuNyAyLjJ2NC4zSDExLjFWOXoiLz48L3N2Zz4=");
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
}
.profile-link.linkedin:hover .linkedin-icon { filter:grayscale(1) drop-shadow(0 0 4px #111); }

.profile-link-icon.publications-icon {
  position: relative;
  width: 16px;
  height: 18px;
  border: 1.5px solid #fff;
  border-radius: 2px;
  filter: none;
}

.profile-link-icon.publications-icon::before,
.profile-link-icon.publications-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1.5px;
  background: #fff;
  border-radius: 999px;
}

.profile-link-icon.publications-icon::before {
  top: 5px;
}

.profile-link-icon.publications-icon::after {
  top: 10px;
}

@media (prefers-reduced-motion: reduce) { .profile-link { transition:none; } }

/* Team Page */
.team-page {
  padding: var(--spacing-md);
  padding-top: calc(var(--header-height) + var(--spacing-md));
  text-align: center;
  margin: 0 auto;
  background: var(--color-bg);
}

.team-section {
  margin-bottom: var(--spacing-xl);
}

.team-hero {
  max-width: var(--max-width-content);
  margin: 0 auto var(--spacing-xl);
}

.team-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 46%;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(226, 226, 226, 0.9);
  box-shadow: var(--shadow-large);
}

.team-section h2 {
  font-size: var(--font-size-xxl);
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
}

.team-section h2::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--color-primary);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: center;
}

.team-card {
  width: 200px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-medium), color var(--transition-medium);
  margin-bottom: 2rem;
}

.team-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(226, 226, 226, 0.95);
  box-shadow: var(--shadow-small);
  transition: box-shadow var(--transition-medium), transform var(--transition-medium), border-color var(--transition-medium);
}

.team-card:hover img {
  box-shadow: var(--shadow-medium);
  border-color: rgba(0, 0, 0, 0.3);
}

.team-card:hover {
  transform: translateY(-4px);
  color: var(--color-accent);
}

.team-card h3 {
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-large);
}

@keyframes contentFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.research-intro,
.publications-showcase,
.small-cards-row,
.contact-container,
.team-hero,
.team-section,
.profile-container {
  animation: contentFadeUp 0.55s ease both;
}

.team-card,
.collab-item,
.small-card,
.pub-card {
  will-change: transform;
}

.collab-item,
.small-card,
.pub-card,
.team-card img {
  transition:
    transform var(--transition-medium),
    box-shadow var(--transition-medium),
    border-color var(--transition-medium);
}

@supports (content-visibility: auto) {
  .research-showcase,
  .publications-showcase,
  .small-cards-row,
  .contact-section,
  .team-section,
  .collaborators {
    content-visibility: auto;
    contain-intrinsic-size: 1px 640px;
  }

  .pub-card,
  .team-card,
  .collab-item {
    contain: layout paint;
  }
}

/* Publications Section */
.publications-showcase {
  padding: var(--spacing-xl) var(--spacing-md);
  padding-top: 3rem;
  position: relative;
  background: var(--color-bg);
}

.publications-showcase .button-container {
  text-align: left;
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-sm);
  max-width: var(--max-width-content);
  margin: var(--spacing-md) auto 0;
}

.section-header {
  font-size: var(--font-size-xl);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding: 0 var(--spacing-sm);
}

.section-header h2 {
  display: inline-block;
  position: relative;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transform: translate(-50%, 20px);
  animation: fadeInUpLine 1s ease 0.3s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpLine {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.pub-featured-wrapper {
  position: relative;
  margin: var(--spacing-md) auto 0;
  max-width: var(--max-width-content);
}

.pub-featured {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.4rem 0.2rem 1.2rem;
  scroll-snap-type: x proximity;
}

.pub-featured::-webkit-scrollbar {
  display: none;
}

.pub-card {
  position: relative;
  cursor: pointer;
  min-width: 340px;
  max-width: 340px;
  height: auto;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid rgba(226, 226, 226, 0.95);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
  box-shadow: var(--shadow-small);
}

.pub-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.28);
}

.pub-card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  height: 100%;
}

.pub-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-border);
  cursor: pointer;
  z-index: 2;
  transition: all var(--transition-medium);
}

.pub-scroll-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-small);
  color: var(--color-accent);
}

.pub-scroll-btn:disabled,
.pub-scroll-btn.is-disabled {
  opacity: 0;
  pointer-events: none;
}

.pub-scroll-btn.left {
  left: -20px;
}

.pub-scroll-btn.right {
  right: -20px;
}

.pub-card-image {
  height: 214px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: #f2f2f2;
}

.pub-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.55rem;
  background: #f7f7f7;
  transition: transform 0.6s;
}

.pub-card:hover .pub-card-image img {
  transform: scale(1.02);
}

.pub-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.pub-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.pub-card-badge {
  font-size: 0.78rem;
  padding: 0.25rem 0.58rem;
  border-radius: 999px;
  background: #f2f2f2;
  white-space: nowrap;
  display: inline-block;
  margin: 0.2rem 0.2rem 0.2rem 0;
  text-overflow: ellipsis;
  max-width: 132px;
  overflow: hidden;
}

.pub-card-badge.medical-imaging,
.pub-card-badge.gnn,
.pub-card-badge.generative,
.pub-card-badge.vlm,
.pub-card-badge.topology,
.pub-card-badge.microscopy,
.pub-card-badge.spectroscopy,
.pub-card-badge.year {
  background-color: #f2f2f2;
  border: 1px solid #e2e2e2;
  color: #202020;
}

.pub-card h3 {
  font-size: 1.12rem;
  margin: var(--spacing-xs) 0;
  line-height: 1.35;
  color: var(--color-primary);
  overflow-wrap: anywhere;
}

.pub-card-venue {
  margin: 0 0 0.85rem;
  color: var(--color-text-light);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  font-size: var(--font-size-small);
  color: var(--color-text-light);
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: var(--border-radius-sm);
  padding: 0.22rem 0.45rem;
  line-height: 1.25;
}

.view-all-btn {
  text-decoration: none;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-md);
  font-weight: 700;
  transition: background var(--transition-medium), color var(--transition-medium), transform var(--transition-medium), border-color var(--transition-medium);
  margin-left: var(--spacing-sm);
}

.view-all-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

.view-all-btn svg {
  transition: transform var(--transition-medium);
}

.view-all-btn:hover svg {
  transform: translateX(5px);
}

.view-all-btn path {
  fill: currentColor;
}

@keyframes typing {
  from { width: 0 }
  to { width: 17ch }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: black }
}

.typing-title {
  opacity: 1;
  position: relative;
  margin: 0;
  font-family: var(--font-base);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  white-space: normal;
  overflow: visible;
  width: auto;
  border-right: 0;
  height: auto;
}

.typing-title.animate {
  opacity: 1;
  animation: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  :root { --font-size-huge: 2.5rem; }
  .slide-content h2 { font-size: 4.2rem; }
  .paper-bg { padding: 3.4rem 3rem 3.4rem 52%; }
  .paper-collage { min-height: 370px; }
  .paper-slide-content { max-width: 500px; }
  .paper-slide-content h2 { font-size: 2.3rem; max-width: 500px; }
  .hero-paper-summary { display: none; }
  .pub-card { min-width: 310px; max-width: 310px; height: auto; min-height: 500px; }
  :root { --header-height: 58px; }
  .logo { font-size: 1.2rem; flex: 0 0 auto; }
  .hero-carousel { height: 62vh; min-height: 480px; }
  .carousel-slide { height: 100%; }
}

@media (max-width: 768px) {
  :root { --font-size-huge: 2rem; --spacing-xl: 3rem; --spacing-lg: 2rem; }
  body { overflow-x: hidden; }
  .header-inner {
    grid-template-columns: minmax(92px, 0.9fr) minmax(0, auto) 40px;
    gap: 0.4rem;
    padding: 0.4rem var(--spacing-sm);
  }
  .logo { font-size: 0.9rem; }
  .top-nav { min-width: 0; }
  .top-nav ul { gap: 0.15rem; }
  .top-nav ul li a, .nav-btn { font-size: 0.9rem; padding: 0.5rem; }
  .nav-right { min-width: 0; }
  .nav-right .search-btn { width: 36px; height: 36px; }
  .search-content {
    top: calc(var(--header-height) + 1rem);
    width: min(92vw, 800px);
  }
  .search-container { padding: 1rem 0; }
  .search-input { font-size: 1.25rem; }
  .search-results {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .hero-carousel { height: 58vh; min-height: 430px; }
  .carousel-slide { height: 100%; }
  .slide-content {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 4.2rem;
    max-width: 620px;
  }
  .slide-content h2 { font-size: 3.2rem; }
  .slide-content p { font-size: 0.9rem; }
  .paper-hero {
    height: 620px;
    min-height: 620px;
    max-height: none;
  }
  .paper-bg {
    align-items: flex-start;
    justify-content: center;
    bottom: auto;
    height: 260px;
    padding: 0.85rem 1rem 0.75rem;
    background: #f6f6f6;
  }
  .paper-collage {
    width: min(100%, 500px);
    height: 100%;
    min-height: 0;
  }
  .paper-collage::before {
    inset: 8% 3% 8% 8%;
  }
  .paper-collage::after {
    inset: clamp(0.5rem, 1.4vw, 0.8rem);
  }
  .paper-collage-frame img {
    padding: 0.22rem;
  }
  .paper-collage-frame:hover,
  .paper-collage-frame:focus-visible,
  .paper-collage-frame.primary:hover,
  .paper-collage-frame.primary:focus-visible {
    transform: translateY(-4px) scale(1.035);
  }
  .paper-zoom-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
      max(0.9rem, env(safe-area-inset-top))
      max(0.9rem, env(safe-area-inset-right))
      max(0.9rem, env(safe-area-inset-bottom))
      max(0.9rem, env(safe-area-inset-left));
  }
  .paper-zoom-dialog {
    position: relative;
    left: auto;
    top: auto;
    width: min(94vw, 720px);
    height: min(76vh, 680px);
    max-height: calc(100vh - 1.8rem);
    transform: translateY(12px) scale(0.96);
  }
  @supports (height: 100svh) {
    .paper-zoom-dialog {
      height: min(76svh, 680px);
      max-height: calc(100svh - 1.8rem);
    }
  }
  .paper-zoom-modal.is-open .paper-zoom-dialog {
    transform: translateY(0) scale(1);
  }
  .paper-zoom-dialog.is-wide {
    height: auto;
    max-height: calc(100vh - 1.8rem);
  }
  @supports (height: 100svh) {
    .paper-zoom-dialog.is-wide {
      max-height: calc(100svh - 1.8rem);
    }
  }
  .paper-zoom-dialog.is-wide .paper-zoom-image-wrap {
    max-height: min(58vh, 520px);
  }
  .paper-zoom-dialog.is-wide .paper-zoom-close {
    top: auto;
    right: 0.55rem;
    bottom: 0.6rem;
  }
  @supports (height: 100svh) {
    .paper-zoom-dialog.is-wide .paper-zoom-image-wrap {
      max-height: min(58svh, 520px);
    }
  }
  .paper-zoom-caption {
    display: block;
    max-height: min(7.5rem, 24vh);
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  @supports (height: 100svh) {
    .paper-zoom-caption {
      max-height: min(7.5rem, 24svh);
    }
  }
  .paper-hero .carousel-slide::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 41%, rgba(0, 0, 0, 0.9) 42%, #0f0f0f 100%);
  }
  .paper-slide-content {
    top: 286px;
    left: 1rem;
    right: 1rem;
    bottom: auto;
    transform: none;
    max-width: none;
  }
  .paper-slide-content h2 {
    font-size: 2.15rem;
    line-height: 1.12;
    max-width: 100%;
  }
  .hero-paper-summary {
    display: none;
  }
  .hero-paper-members {
    margin: 0.75rem 0;
  }
  .hero-paper-venue {
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
  }
  .paper-hero .carousel-arrow {
    display: none;
  }
  .carousel-indicators {
    bottom: 0.85rem;
    gap: 0.1rem;
  }
  .dot {
    width: 42px;
    height: 34px;
  }
  .dot::before {
    width: 24px;
  }
  .dot.active::before {
    width: 32px;
  }
  .hero-btn { font-size: 1rem; }
  .overlay-content { flex-direction: column; gap: var(--spacing-md); }
  .overlay-left, .overlay-right { width: 100%; }
  .profile-container, .team-grid { gap: var(--spacing-md); }
  .team-section h2 { font-size: 1.9rem; margin-bottom: 2rem; }
  .pub-featured { gap: var(--spacing-sm); }
  .pub-card { min-width: 290px; max-width: 290px; height: auto; min-height: 500px; }
  .footer { padding: 2rem 1rem; }
  .footer-logos {
    gap: 0.8rem;
    flex-wrap: nowrap;
  }
  .footer-logo {
    max-width: min(42vw, 200px);
    max-height: 80px;
  }
  .footer-divider { height: 42px; flex: 0 0 1px; }
  .legal-popup-content { padding: 20px; }
  .legal-popup h2 { font-size: 20px; }
  .legal-section h3 { font-size: 16px; }
}

@media (max-width: 600px) {
  .nav-right { flex: 0 0 auto; }
  .top-nav { flex: 1; justify-content: center; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav ul { padding: 0; margin: 0 auto; width: auto; }
}

@media (max-width: 480px) {
  :root { --font-size-xxl: 1.8rem; --font-size-xl: 1.3rem; --spacing-md: 1.5rem; }
  .header-inner {
    grid-template-columns: minmax(76px, 0.72fr) minmax(0, 1.9fr) 34px;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
  }
  .logo {
    font-size: 0.84rem;
    margin-right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-nav ul { gap: 0.1rem; }
  .top-nav ul li a, .nav-btn { font-size: 0.8rem; padding: 0.4rem; }
  .nav-right .search-btn { width: 32px; height: 32px; }
  .search-icon { transform: scale(0.88); }
  .hero-carousel { height: 56vh; min-height: 390px; }
  .carousel-slide { height: 100%; }
  .slide-content { bottom: 3.8rem; }
  .slide-content h2 { font-size: 2.45rem; }
  .paper-hero {
    height: 610px;
    min-height: 610px;
  }
  .paper-bg {
    height: 228px;
    padding: 0.75rem 0.75rem 0.65rem;
  }
  .paper-collage {
    height: 100%;
    min-height: 0;
    gap: 0.45rem;
    padding: 0.5rem;
  }
  .paper-collage-frame.primary {
    grid-column: 1 / 10;
    grid-row: 1 / 6;
    width: auto;
    height: auto;
  }
  .paper-collage-frame.secondary {
    grid-column: 10 / 13;
    grid-row: 1 / 4;
    width: auto;
    height: auto;
  }
  .paper-collage-frame.tertiary {
    grid-column: 1 / 6;
    grid-row: 6 / 9;
    width: auto;
    height: auto;
  }
  .paper-collage-frame.quaternary {
    grid-column: 6 / 13;
    grid-row: 6 / 9;
    width: auto;
    height: auto;
  }
  .paper-slide-content { top: 249px; }
  .paper-slide-content h2 { font-size: 1.72rem; }
  .hero-paper-kicker { gap: 0.32rem; margin-bottom: 0.65rem; }
  .hero-paper-kicker span,
  .hero-paper-member {
    min-height: 24px;
    font-size: 0.72rem;
    padding: 0.22rem 0.42rem;
  }
  .hero-paper-venue {
    display: none;
  }
  .paper-zoom-dialog {
    height: min(70vh, 620px);
    max-height: calc(100vh - 1.6rem);
  }
  .paper-zoom-dialog.is-wide {
    height: auto;
    max-height: calc(100vh - 1.6rem);
  }
  @supports (height: 100svh) {
    .paper-zoom-dialog {
      height: min(70svh, 620px);
      max-height: calc(100svh - 1.6rem);
    }
    .paper-zoom-dialog.is-wide {
      height: auto;
      max-height: calc(100svh - 1.6rem);
    }
  }
  .paper-zoom-image-wrap {
    padding: 0.65rem;
  }
  .paper-zoom-caption {
    min-height: 54px;
    padding: 0.78rem 3.5rem 0.8rem 0.85rem;
    font-size: 0.86rem;
  }
  .paper-zoom-close {
    right: 0.55rem;
    top: 0.55rem;
    width: 34px;
    height: 34px;
  }
  .hero-btn { font-size: 0.9rem; padding: 0.72rem 0.9rem; }
  .carousel-arrow { width: 30px; height: 30px; font-size: 1rem; }
  .pub-scroll-btn { width: 30px; height: 30px; }
  .team-card { width: 150px; }
  .team-page { padding-left: 1rem; padding-right: 1rem; }
  .team-section { margin-bottom: 2.6rem; }
  .team-section h2 { font-size: 1.75rem; }
  .pub-card { min-width: 270px; max-width: 270px; height: auto; min-height: 490px; }
  .pub-card-image { height: 190px; }
  .small-cards-row { width: 100%; margin: 1.5rem auto; padding: 0 0.85rem; }
  .infinite-scroll .small-card {
    max-width: min(78vw, 330px);
    margin-right: 12px;
  }
  .infinite-scroll .small-card.featured-group-photo { height: 285px; }
  .featured-group-photo .small-card-image { height: 220px; }
  .footer-logo { max-height: 58px; }
  .footer-divider { height: 34px; }
  .footer-text { font-size: 0.85rem; line-height: 1.45; }
  .legal-popup-content { padding: 15px; }
  .legal-popup h2 { font-size: 18px; margin-bottom: 15px; }
  .legal-section { margin-bottom: 15px; }
}

@media (hover: none) {
  .paper-collage:hover .paper-collage-frame:not(:hover) {
    opacity: 1;
    filter: none;
  }

  .pub-card:hover,
  .small-card:hover,
  .team-card:hover,
  .collab-item:hover,
  .position-card:hover {
    transform: none;
  }
}

@supports not (backdrop-filter: blur(8px)) {
  .header { background: rgba(241, 240, 240, 0.95); }
  .overlay .blur-bg { background: rgba(0, 0, 0, 0.9); }
  .search-result-item { background: rgba(255, 255, 255, 0.3); }
}

@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;
  }
  .cards-scroll-wrapper.infinite-scroll {
    animation: none !important;
  }
}
