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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

header {
  background: linear-gradient(135deg, #222, #00bcd4);
  /* Gradient background */
  color: white;
  padding: 30px 20px;
  /* More padding for better spacing */
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  /* Subtle shadow */
}

.header-container {
  max-width: 800px;
  margin: 0 auto;
  /* Center content */
  padding: 10px;
}

header h1 {
  font-size: 2.5rem;
  /* Larger font size */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

header h1 .half-white {
  color: white;
}

header h1 .half-blue {
  color: #00bcd4;
}

.subtitle {
  font-size: 1.2rem;
  color: #e0e0e0;
  /* Slightly brighter gray */
  margin: 10px 0 20px;
  line-height: 1.6;
  /* Better line spacing */
}

.subtitle b {
  color: #00bcd4;
  /* Highlighted in blue */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  /* Add gap for consistent spacing */
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
}

nav ul li a:hover {
  background-color: #00bcd4;
  /* Background highlight on hover */
  transform: scale(1.1);
  /* Slight scaling effect */
}

/* Hamburger Menu Toggle Button */
.menu-toggle {
  display: none;
  /* Hidden by default */
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: transparent;
  color: white;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  z-index: 20;
  /* Ensure it is above the menu */
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    /* Show the button on small screens */
  }

  .nav-menu {
    display: none;
    /* Hide the menu by default */
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    background-color: #222;
    /* Same background as the header */
    position: absolute;
    top: 60px;
    /* Adjust based on header height */
    right: 0;
    left: 0;
    z-index: 10;
    padding: 10px 0;
  }

  .nav-menu.active {
    display: flex;
    /* Show the menu when active */
  }

  nav ul li {
    margin: 10px 0;
    /* Add spacing between items */
  }
}

main {
  padding: 2rem;
}

section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

section h2 {
  margin-bottom: 1rem;
  color: #00bcd4;
}

footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}

footer p {
  font-size: 0.9rem;
}

/* Back-to-Top Button Styles */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #00bcd4;
  color: white;
  font-size: 1.5rem;
  text-align: center;
  width: 50px;
  /* Ensure equal width */
  height: 50px;
  /* Ensure equal height */
  line-height: 50px;
  /* Center the arrow vertically */
  border-radius: 50%;
  /* Make it circular */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
  display: none;
  /* Hidden by default */
}

.back-to-top:hover {
  background-color: #008c9e;
  transform: scale(1.1);
}

/* Show the button when scrolling */
.show-back-to-top {
  display: block;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  nav ul li {
    margin: 10px 0;
  }

  section {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
    /* Smaller font size for smaller screens */
  }

  .subtitle {
    font-size: 1rem;
  }
}

/* Center Tables */
table {
  margin: 20px auto;
  /* Centers the table horizontally */
  border-collapse: collapse;
  /* Combines table borders for a clean look */
  width: 80%;
  /* Adjusts table width for better readability */
  text-align: left;
  /* Keeps text alignment readable */
  border: 1px solid #ccc;
  /* Adds a light border for clarity */
}

th,
td {
  padding: 10px;
  /* Adds space inside table cells */
  border: 1px solid #ddd;
  /* Adds a subtle border for cell separation */
}

th {
  background-color: #00bcd4;
  /* Highlights table headers */
  color: white;
  /* Ensures text is readable on a blue background */
}

td {
  background-color: #f9f9f9;
  /* Light gray background for rows */
}

/* Center Explanatory Note */
.table-description {
  text-align: center;
  /* Centers the text below the table */
  margin-top: 10px;
  /* Adds some spacing between the table and the note */
  font-size: 0.9rem;
  /* Adjusts font size for better readability */
  color: #333;
  /* Matches the text color of the site */
}


/* Center the Responsible Disclosure Timeline */
#disclosure .resume-section-content {
  max-width: 800px;
  /* Limit the width for readability */
  margin: 0 auto;
  /* Center the content horizontally */
  text-align: left;
  /* Maintain left alignment for timeline details */
}

#disclosure ul {
  padding-left: 20px;
  /* Add padding for list items */
  margin-top: 20px;
  /* Add spacing above the list */
}

#disclosure ul li {
  margin-bottom: 15px;
  /* Add spacing between list items */
}

#disclosure ul li p {
  margin: 5px 0;
  /* Adjust paragraph spacing */
  line-height: 1.6;
  /* Improve readability */
}

#disclosure a {
  color: #00bcd4;
  /* Use a consistent link color */
  text-decoration: none;
  /* Remove underline for links */
}

#disclosure a:hover {
  text-decoration: underline;
  /* Add underline on hover */
}

/* Publications Section */
#publications {
  background-color: #fff;
  /* Light background to distinguish the section */
  padding: 50px 20px;
  text-align: left;
}

/* #publications h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #333;
} */

#publications .subheading {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
  margin-top: 10px;
  color: #00bcd4;
}

#publications p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

#publications .publication-button {
  display: inline-block;
  margin-bottom: 30px;
  margin-top: 10px;
}

#publications .publication-button a {
  background-color: #00bcd4;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#publications .publication-button a:hover {
  background-color: #008c9e;
}

#publications .author-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

#publications .card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 300px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#publications .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#publications .card h5 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 10px;
}

#publications .card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 20px;
}

#publications .card a {
  background-color: #00bcd4;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

#publications .card a:hover {
  background-color: #008c9e;
}

/* CVE Section */
#cve {
  background-color: #fff;
  /* Light background to distinguish the section */
  padding: 50px 20px;
  text-align: left;
}

/* #cve h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #333;
} */

#cve .subheading {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #00bcd4;
}

#cve p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 30px;
}

#cve ul {
  list-style: none;
  /* Remove default bullet points */
  padding: 0;
}

#cve ul li {
  font-size: 1rem;
  margin-bottom: 15px;
}

#cve ul li a {
  color: #00bcd4;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

#cve ul li a:hover {
  color: #008c9e;
  /* Darker blue on hover */
}

/* QandA Section */
#QandA {
  background-color: #fff;
  padding: 60px 20px;
  text-align: left;
}

#QandA h3 {
  /* font-size: 2.8rem; */
  margin-bottom: 30px;
  /* color: #333;
  font-weight: bold; */
}

#QandA .subheading {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #00bcd4;
}

#QandA .qa-container {
  max-width: 800px;
  margin: 0 auto;
}

#QandA .qa-button {
  background-color: #00bcd4;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#QandA .qa-button:hover {
  background-color: #008c9e;
}

#QandA .qa-button.active {
  background-color: #005f70;
}

#QandA .qa-content {
  display: none;
  background-color: #fff;
  color: #555;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: -10px;
  /* Overlap with button spacing */
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease;
}

#QandA .qa-content ul {
  list-style: disc;
  padding-left: 20px;
}

#QandA .qa-content ul li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

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

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

.popup {
  display: none; /* Nasconde il popup di default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  padding: 20px;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* Sfondo scuro quando il popup è visibile */
.overlay {
  display: none; /* Nasconde lo sfondo di default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Stile per il pulsante di chiusura ("X") */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}