:root {
  --bg-color-light: #fff;
  --text-color-light: #000;
  --button-bg-light: transparent;
  --button-border-light: #000;
  --button-hover-bg-light: #000;
  --button-hover-text-light: #fff;

  --bg-color-dark: #000;
  --text-color-dark: #fff;
  --button-bg-dark: transparent;
  --button-border-dark: #fff;
  --button-hover-bg-dark: #fff;
  --button-hover-text-dark: #000;
}

[data-theme="light"] {
  --bg-color: var(--bg-color-light);
  --text-color: var(--text-color-light);
  --button-bg: var(--button-bg-light);
  --button-border: var(--button-border-light);
  --button-hover-bg: var(--button-hover-bg-light);
  --button-hover-text: var(--button-hover-text-light);
}

[data-theme="dark"] {
  --bg-color: var(--bg-color-dark);
  --text-color: var(--text-color-dark);
  --button-bg: var(--button-bg-dark);
  --button-border: var(--button-border-dark);
  --button-hover-bg: var(--button-hover-bg-dark);
  --button-hover-text: var(--button-hover-text-dark);
}

html,
body {
  margin: 0.5rem;
  padding: 1rem 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* min-height: calc(80dvh - 4rem); */
  min-height: calc(80dvh);
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.5
}

h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  margin-top: 2rem;
  animation: fadeIn 1s ease-out;

}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.button-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.button {
  display: flex;
  align-items: center;
  /* Vertically center content */
  justify-content: center;
  /* Horizontally center content (optional) */
  background-color: var(--button-bg);
  border: 2px solid var(--button-border);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  min-height: 40px;
  transition: background-color 0.3s, color 0.3s;
}

.button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
}

.toggle-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.toggle {
  cursor: pointer;
  appearance: none;
  width: 50px;
  height: 26px;
  background-color: #666;
  border-radius: 13px;
  position: relative;
  outline: none;
  transition: background-color 0.3s;
}

.toggle::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.toggle:checked::before {
  transform: translateX(24px);
}

/* Change theme based on toggle state using :checked + body */
#theme-toggle:checked~html {
  --bg-color: var(--bg-color-light);
  --text-color: var(--text-color-light);
}

/* Here's the research page stuff! */

.research-list {
  list-style-type: none;
  padding: 0;
  margin: 2rem 2rem;
}

.research-list li {
  display: flex;
  /* Use flexbox to align thumbnail and text */
  align-items: flex-start;
  /* Align the top of the thumbnail with the title */
  gap: 1rem;
  /* Add spacing between the thumbnail and the text */
  margin-bottom: 1.5rem;
  /* Add spacing between list items */
  text-align: left;
  /* Left-aligns the text */
}

.research-list a {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.research-list a:hover {
  color: var(--button-hover-bg);
}

.description {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.8;
  text-align: left;
  /* Left-aligns the description */
}

/* Center the descriptions of the papers */
.research-list .description {
  max-width: 800px;
  /* Optional: Limit the width for better readability */
}

/* Styled horizontal line */
.styled-hr {
  border: none;
  /* Remove default border */
  border-top: 2px solid #ccc;
  /* Add a custom border */
  margin: 2rem 0;
  /* Add spacing above and below */
  width: 100%;
  /* Make it span the full width */
  max-width: 800px;
  /* Optional: Limit the width */
  margin-left: auto;
  /* Center the line */
  margin-right: auto;
  /* Center the line */
}


/* Thumbnail images */
.thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.3s;
  border: 2px solid #ccc;
}

.thumbnail:hover {
  transform: scale(1.1);
  border-color: #888;
}

/* Title and description container */
.paper-content {
  display: flex;
  flex-direction: column;
  /* Stack the title and description vertically */
  justify-content: left;
}

/* Title container for inline layout */
.title-container {
  display: inline-flex;
  /* Align title and arXiv logo inline */
  align-items: center;
  /* Vertically align the logo with the title */
  gap: 0.5rem;
  /* Add spacing between the title and the logo */
}

/* Style for the arXiv logo */
.arxiv-logo {
  width: 20px;
  /* Adjust size as needed */
  height: 20px;
  vertical-align: middle;
  /* Align with the text */
  cursor: pointer;
  transition: transform 0.3s;
}

.arxiv-logo:hover {
  transform: scale(1.1);
  /* Slight zoom effect on hover */
}

/* Modal styles */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: auto;
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}