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

body {
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #fff8ec;
  color: #102033;
}

.navbar {
  height: 72px;
  padding: 0 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 248, 236, 0.96);
  border-bottom: 1px solid rgba(197, 132, 32, 0.24);
}

.logo {
  color: #c98420;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo span {
  color: #102033;
}

/* PUSH NAV TO RIGHT */
nav {
  display: flex;
  gap: 56px;
  margin-left: auto;
  margin-right: 26px;
}

nav a {
  color: #102033;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 27px 0;
  transition: 0.3s ease;
}

nav a.active,
nav a:hover {
  color: #c98420;
  border-bottom: 3px solid #c98420;
}

/* THEME TOGGLE */
.theme-switch {
  width: 74px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.switch-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3c56d, #df9e29);
  border: 1px solid rgba(201, 132, 32, 0.35);
  transition: all 0.4s ease;
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.04),
    0 0 14px rgba(35, 140, 255, 0.12);
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf7, #ffe6ad);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(36px);
  transition:
    transform 0.4s ease,
    background 0.4s ease;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.28),
    inset 0 1px 2px rgba(255,255,255,0.7);
}

.icon-toggle {
  position: absolute;
  font-size: 15px;
  transition: all 0.35s ease;
}

.sun {
  color: #f4a100;
  opacity: 1;
  transform: translateY(0);
}

.moon {
  color: #16345f;
  opacity: 0;
  transform: translateY(-10px);
}

.hero {
  min-height: 450px;
  padding-top: 88px;
  height: 300px;

  background-image:
    linear-gradient(
      90deg,
      rgba(255,248,236,.96),
      rgba(255,248,236,.68),
      rgba(255,248,236,.18)
    ),
    url("../assets/images/hero_3_light.png");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: max(1920px, 100%) auto;
  background-color: #fff8ec;

  transition: background 0.4s ease;
}

.hero-text {
  margin-left: 76px;
  max-width: 580px;
}

.hero-text h1 {
  font-size: 66px;
  font-weight: 400;
  letter-spacing: -1px;
}

.hero-text h1 span {
    color: #c98420;
}

.hero-text p {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.7;
  color: #39485c;
}

.publications-layout {
  display: grid;
  grid-template-columns: 278px 1fr;
  gap: 32px;
  padding: 28px 56px 48px;
}

.filters {
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 6px;
  padding: 20px;
  height: fit-content;
}

.filters h2 {
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 1.4px;
  margin-bottom: 18px;
  color: #102033;
}

.filter-group {
  border-top: 1px solid rgba(201,132,32,.16);
  padding: 16px 0;
}

.filter-group h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 13px;
  display: flex;
  justify-content: space-between;
  color: #102033;
}

.filter-group h3 span {
  color: #c98420;
}

label {
  display: block;
  margin: 10px 0;
  color: #48596d;
  font-size: 14px;
}

input {
  accent-color: #c98420;
  margin-right: 8px;
}

.results-top {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #48596d;
  margin-bottom: 8px;
}

.sort {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sort select {
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(201,132,32,.18);
  color: #102033;
  padding: 11px 42px 11px 16px;
  border-radius: 5px;
  outline: 0;
  cursor: pointer;
}

.publication-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.52fr) minmax(0, 1.85fr) minmax(150px, 0.9fr);
  column-gap: 18px;
  row-gap: 16px;
  align-items: start;
  margin-bottom: 8px;
  padding: 18px 22px;
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 5px;
}

.publication-meta {
  display: grid;
  gap: 8px;
  color: #102033;
  font-size: 14px;
  line-height: 1.35;
}

.research-type,
.publisher {
  font-weight: 700;
}

.publication-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 9px;
  color: #102033;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.publication-card h3 a {
  color: inherit;
}

.journal {
  color: #b87316;
  font-weight: 600;
  margin-bottom: 9px;
}

.authors {
  color: #69798c;
  font-size: 14px;
}

time {
  color: #48596d;
  font-size: 14px;
}

.publication-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 4px;
  background: rgba(255,255,255,.58);
}

.publication-image::before {
  content: "";
  position: absolute;
  inset: -18px;
  background-image: var(--publication-image-bg);
  background-position: center;
  background-size: cover;
  filter: blur(18px);
  opacity: .42;
  transform: scale(1.08);
}

.publication-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.32);
}

.publication-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.publications-message {
  padding: 22px;
  background: linear-gradient(180deg, #fffdf8, #f6ead8);
  border: 1px solid rgba(201,132,32,.18);
  border-radius: 5px;
  color: #48596d;
}

.publications-message-loading {
  color: #c98420;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.pagination button {
  width: 35px;
  height: 35px;
  background: transparent;
  color: #48596d;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.pagination .current,
.pagination button:not(:disabled):hover {
  background: rgba(201,132,32,.18);
  color: #c98420;
}

@media (max-width: 900px) {
  .navbar {
    height: auto;
    padding: 24px;
    flex-direction: column;
    gap: 18px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .page-hero {
    height: 340px;
  }

  .hero-text {
    margin: 0 28px;
  }

  .hero-text h1 {
    font-size: 48px;
  }

  .publications-layout {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .publication-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .publication-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .publication-image {
    max-height: 180px;
  }
}
