#main-content.show {
  opacity: 1;
  display: block;
}
body {
  font-family: 'Montserrat', 'Bree Serif', serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(120deg, #f8fafc 0%, #e0e7ff 40%, #a6ffcb 100%);
  transition: background 0.5s;
}
body.dark-theme {
  background: linear-gradient(120deg, #232526 0%, #282a2d 40%, #313337 100%);
}

.pub-hero {
  text-align: center;
  padding: 64px 16px 32px 16px;
  position: relative;
  overflow: hidden;
}
.pub-hero-title {
  font-size: 3rem;
  font-family: 'Montserrat', 'Bree Serif', serif;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  text-align: center;
  z-index: 2;
  animation: fadeInDown 1.2s cubic-bezier(.4,0,.2,1);
}
.pub-hero-gradient-text {
  background: linear-gradient(90deg, #ffd700, #1fa2ff, #a6ffcb, #ff512f, #ffd700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: pubGradientMove 4s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 2px 16px #1fa2ff55);
}
@keyframes pubGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.pub-hero-underline {
  display: block;
  width: 80%;
  height: 6px;
  margin: 0 auto;
  background: linear-gradient(90deg, #ffd700, #1fa2ff);
  border-radius: 3px;
  margin-top: 8px;
  animation: underlineGrow 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes underlineGrow {
  from { width: 0; }
  to { width: 80%; }
}
.pub-hero-quote {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 18px;
  color: #232946;
  text-shadow: 0 2px 12px #e0e7ffcc;
  animation: fadeInUp 1.2s cubic-bezier(.4,0,.2,1);
  z-index: 2;
}
body.dark-theme .pub-hero-quote {
  color: #e0e7ff;
  text-shadow: 0 2px 12px #23294655;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px);}
  to { opacity: 1; transform: none; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px);}
  to { opacity: 1; transform: none; }
}

.pub-filter-section {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.pub-dropdown {
  position: relative;
  display: inline-block;
  width: 180px;
}
.pub-dropdown-btn {
  background: #fff;
  color: #232946;
  padding: 12px 32px 12px 20px;
  font-size: 1.1rem;
  border: none;
  border-radius: 24px;
  box-shadow: 0 2px 12px #1fa2ff22;
  cursor: pointer;
  transition: background 0.3s;
  outline: none;
}
body.dark-theme .pub-dropdown-btn {
  background: #232526;
  color: #e0e7ff;
  box-shadow: 0 2px 12px #23294655;
}
.pub-dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 8px 24px #1fa2ff22;
  border-radius: 12px;
  z-index: 10;
  margin-top: 8px;
  overflow-y: auto;
  max-height: 220px;
  width: 100%;
  left: 0;
  top: 100%;
}
body.dark-theme .pub-dropdown-content {
  background: #232526;
  box-shadow: 0 8px 24px #23294655;
}
.pub-dropdown-content button {
  color: #232946;
  background: none;
  border: none;
  padding: 12px 20px;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
body.dark-theme .pub-dropdown-content button {
  color: #e0e7ff;
}
.pub-dropdown-content button:hover {
  background: #e0e7ff44;
}
body.dark-theme .pub-dropdown-content button:hover {
  background: #39393988;
}

.pub-list-section {
  max-width: 1100px;
  margin: 0 auto 64px auto;
  padding: 0 8px;
}
.pub-year-section {
  margin-bottom: 48px;
  animation: fadeInUp 1s cubic-bezier(.4,0,.2,1);
}
.pub-year-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #1fa2ff;
  margin-bottom: 24px;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  animation: yearPop 0.8s cubic-bezier(.4,0,.2,1);
}
@keyframes yearPop {
  0% { opacity: 0; transform: scale(0.8);}
  80% { transform: scale(1.08);}
  100% { opacity: 1; transform: scale(1);}
}
.pub-items {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: start;
}
.pub-item {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px #1fa2ff22;
  padding: 16px;
  flex: 1 1 28%;
  max-width: 32%;
  min-width: 260px;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  animation: fadeIn 0.8s cubic-bezier(.4,0,.2,1);
}
.pub-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px #1fa2ff44;
}
body.dark-theme .pub-item {
  background: #232526;
  box-shadow: 0 2px 16px #23294655;
}
.pub-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #e0e7ff;
}
body.dark-theme .pub-img {
  background: #393939;
}
.pub-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #1fa2ff, #a21caf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
  min-height: 48px;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
body.dark-theme .pub-title {
  background: linear-gradient(90deg, #a6ffcb, #1fa2ff);
  background: linear-gradient(90deg, #a6ffcb, #1fa2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pub-authors{
  font-size: 0.5rem;
  color: #666;
  margin-bottom: 4px;
  min-height: 24px;
}
body.dark-theme .pub-authors {
  color: #bdbdbd;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px);}
  to { opacity: 1; transform: none;}
}

@media (max-width: 700px) {
  .pub-items { flex-direction: column; gap: 16px;}
  .pub-item { max-width: 100%; min-width: 0;}
  .pub-hero-title { font-size: 2.1rem;}
  .pub-year-heading { font-size: 1.3rem;}
}
.pub-dropdown-btn {
  pointer-events: auto;
}
.pub-dropdown-btn * {
  pointer-events: auto;
}
