/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  --first-hue: 250;
  --sat: 66%;
  --lig: 75%;
  --second-hue: 219;
  --first-color: hsl(var(--first-hue), var(--sat), var(--lig));
  --first-color-alt: hsl(var(--first-hue), var(--sat), 71%);
  --title-color: hsl(var(--second-hue), 15%, 95%);
  --text-color: hsl(var(--second-hue), 8%, 75%);
  --text-color-light: hsl(var(--second-hue), 4%, 55%);
  --body-color: hsl(var(--second-hue), 48%, 8%);
  --container-color: hsl(var(--second-hue), 32%, 12%);

  /*========== Font and typography ==========*/
  --body-font: "Poppins", sans-serif;
  --biggest-font-size: 1.75rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;
  --tiny-font-size: .625rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semibold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/*========== Light theme variables ==========*/
[data-theme="light"] {
  --title-color: hsl(var(--second-hue), 15%, 15%);
  --text-color: hsl(var(--second-hue), 8%, 35%);
  --text-color-light: hsl(var(--second-hue), 4%, 55%);
  --body-color: hsl(var(--second-hue), 100%, 99%);
  --container-color: hsl(var(--second-hue), 100%, 97%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color 0.4s, color 0.4s;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-semibold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

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

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1200px;
  margin-inline: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section__title {
  text-align: center;
  font-size: var(--h1-font-size);
  color: var(--title-color);
  margin-bottom: 3rem;
}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--body-color);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--container-color);
  transition: background-color 0.4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__icon {
  font-size: 1.25rem;
}

.nav__title {
  color: var(--title-color);
  font-weight: var(--font-semibold);
  font-size: var(--h3-font-size);
}

.theme-toggle {
  background: var(--container-color);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.4s, transform 0.4s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-icon {
  font-size: 1.25rem;
}

/*=============== FILTER TABS ===============*/
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--container-color);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--first-color);
  color: var(--body-color);
  transform: translateY(-2px);
}

/*=============== PUBLICATIONS GRID ===============*/
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.publication-card {
  background: var(--container-color);
  padding: 2rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.publication-card:hover {
  transform: translateY(-5px);
  border-color: var(--first-color);
  box-shadow: 0 10px 30px hsla(var(--second-hue), 32%, 8%, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.publication-type {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--tiny-font-size);
  font-weight: var(--font-medium);
  text-transform: uppercase;
}

.publication-type.journal {
  background: hsl(250, 66%, 75%);
  color: var(--body-color);
}

.publication-type.conference {
  background: hsl(356, 66%, 75%);
  color: var(--body-color);
}

.publication-type.book {
  background: hsl(174, 63%, 62%);
  color: var(--body-color);
}

.publication-year {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
}

.publication-title {
  font-size: var(--h3-font-size);
  color: var(--title-color);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.publication-authors {
  color: var(--text-color);
  font-size: var(--small-font-size);
  margin-bottom: 0.5rem;
}

.publication-journal {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  font-style: italic;
  margin-bottom: 1rem;
}

.publication-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  color: var(--text-color-light);
  font-size: var(--smaller-font-size);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.publication-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--first-color);
  color: var(--body-color);
}

.btn-primary:hover {
  background: var(--first-color-alt);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color-light);
}

.btn-secondary:hover {
  background: var(--text-color-light);
  color: var(--body-color);
}

/*=============== TRENDS SECTION ===============*/
.trends-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--container-color);
}

.trends-title {
  color: var(--text-color-light);
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
}

/*=============== HIDDEN CLASS ===============*/
.hidden {
  display: none !important;
}

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 480px) {
  .container {
    margin-inline: 1rem;
  }

  .publications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .publication-card {
    padding: 1.5rem;
  }

  .filter-tabs {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: var(--smaller-font-size);
  }

  .publication-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}

@media screen and (min-width: 768px) {
  .container {
    margin-inline: auto;
  }

  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media screen and (min-width: 1200px) {
  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
