/* Color variables */
:root {
  --primary-blue: #2D5FAA;
  --accent-green: #2daa5f;
  --accent-red: #B7293F;
}

/* Basic Reset (optional but recommended) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Makes padding and border included in the element's total width and height */
  }

  a {
    text-decoration: none; /* Remove underlines from all links */
    color: var(--primary-blue); /* Set the default (unvisited) link color (example: a shade of blue) */
  }
  
  a:visited {
    color: #2D5FAA; /* Set the color for visited links (example: a shade of purple) */
  }
  
  a:hover {
    color: var(--accent-green); /* Keep the existing hover color, or change to your liking */
  }
  
  a:active {
    color: #fff; /* Set the color when the link is actively being clicked (example: red) */
  }  
  
  a.youtube-link {
    color: #FF0000;
  }

  a.youtube-link:hover {
    color: var(--accent-red);
  }

body {
  /* font-family: 'Lora', Georgia, serif; */
  /* font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; */
  /* font-family: 'Trebuchet MS', Helvetica, sans-serif; */
  font-family: 'Fira Sans', sans-serif;
  line-height: 1.8;
  background-color: #ffffff;
  color: #222222;
  max-width: 1400px;  /* Adjust to your desired width */
  margin: 0 auto;    /* Centers the content */
  padding: 0px 10px 0px 10px; /* Add padding around the content */
}

main {
  padding: 20px 10px 0px 10px; /* Add padding around the content */
}

header {
  background-color: #2D5FAA;
  color: #fff;
  padding: 15px 0;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky; /* Stay at the top on scroll*/
  top: 0;
  z-index: 100; /* Ensure header stays on top of other content */
}

/* Remove mobile menu button styles */

nav {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  justify-content: center;
}

.quicopt-brand {
  color: #fff;
  font-weight: bold;
  font-size: 1.5rem;
  margin-right: 32px;
  margin-left: 24px;
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  z-index: 101;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

nav .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-green);
}

/* Make language links more prominent and always visible */
.language-link {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.language-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

section {
  margin-bottom: 40px;
  padding: 40px 60px 60px 40px;
  background-color: #f4f4f4;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  scroll-margin-top: 50px;
  border-left: 5px solid var(--primary-blue);
}

h1, h2, h3, h4 {
  /* font-family: 'Merriweather', Georgia, serif; */
  /* font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; */
  /* font-family: 'Trebuchet MS', Helvetica, sans-serif; */
  font-family: 'Fira Sans', sans-serif;
}

h2 {
  color: var(--primary-blue);
  border-left: 6px solid var(--accent-green);
  padding-left: 12px;
  margin-bottom: 18px;
  border-radius: 3px;
}

h3 {
  color: var(--primary-blue);
  /* border-left: 6px solid var(--accent-green); */
  padding-left: 0px;
  margin-top: 20px;
  margin-bottom: 10px;
  border-radius: 3px;
}

h4 {
  color: var(--accent-green);
  margin-top: 10px;
  margin-bottom: 5px;
  border-radius: 3px;
}

.application-note {
  text-align: center;
  padding-top: 30px;
}

#contact {
  text-align: left;
}

#home {
  margin-bottom: 40px !important;
  padding: 0 !important;
  background-color: #f4f4f4;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  scroll-margin-top: 50px;
  border-left: 0px solid var(--primary-blue);
}

#home .home-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: stretch;
  height: 320px;
  min-height: 350px;
  margin: 0 !important;
  padding: 0 !important;
}

.processor-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  grid-row: 1 / span 2;
  grid-column: 1 / 2;
  align-self: stretch;
  justify-self: stretch;
  box-sizing: border-box;
}

.home-text {
  padding-left: 100px;
  padding-right: 160px;
  padding-top: 80px;
  padding-bottom: 0;
}

.home-text strong {
  color: var(--primary-blue);
}

/* Contact section layout */
#contact .contact-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

#contact .contact-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#contact .contact-avatar {
  /* width: 160px;
  height: 160px; */
  max-width: 200px; /* Limit the image size on small screens */
  margin: 0 auto;    /* Center the image horizontally */
  display: block;    /* Ensure margin auto works */  
  border-radius: 5%;
  object-fit: cover;
  border: 0px solid var(--primary-blue);
}

#contact .contact-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

#contact .contact-links img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

#contact .contact-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Contact form styles */
#contact form {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

#contact label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--primary-blue);
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

#contact textarea {
  min-height: 120px;
  resize: vertical;
}

#contact button[type="submit"] {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

#contact button[type="submit"]:hover {
  background: var(--accent-green);
}

/* Inline form status */
#contact .form-status {
  margin-top: 6px;
  font-weight: 600;
}

#contact .form-status.success {
  color: var(--accent-green);
}

#contact .form-status.error {
  color: var(--accent-red);
}

/* Style publication bullet points */
ul:not(nav ul) {
  list-style-type: none; /* Remove default bullets */
  padding-left: 0px;  /* Remove default padding */
}

li:not(nav li) {
  padding-left: 20px; /* Space for the bullet */
  position: relative;  /* Needed for absolute positioning of the bullet */
}

li:not(nav li)::before {
  content: "\2022";  /* Unicode character for a bullet */
  position: absolute;
  left: 0;
  top: -9px; /* Adjust vertical alignment */
  color: var(--primary-blue);   /* Bullet color */
  font-size: 25px;  /* Bullet size */
}

/* Style the caption container */
#contact .profile-caption {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* Style the logo links */
.profile-caption a {
  margin: 0 5px;
  display: inline-flex; /* Use inline-flex for better control */
  align-items: center;   /* Vertically center within the link */
  justify-content: center; /* Horizontally center within the link */
  width: 40px;       /* Set a fixed width for all links */
  height: 40px;      /* Set a fixed height for all links (adjust to your liking) */
}

/* Style the logos */
.profile-caption img {
  max-width: 100%;     /* Make the image fill the link's width */
  max-height: 100%;    /* Make the image fill the link's height */
  width: auto;       /* Let the image scale proportionally */
  height: auto;       /* Let the image scale proportionally */
  object-fit: contain; /* Ensure the image fits within the box without cropping */
  display: block;      /* Removes default inline spacing */
}

footer {
  text-align: center;
  padding: 20px;
  background-color: #ffffff;
  color: var(--primary-blue);
}

/* Hover-swap image utility */
.hover-swap {
  position: relative;
  display: block;
  max-width: 100%;
}

.hover-swap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.hover-swap .hover-image {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.hover-swap:hover .hover-image {
  opacity: 1;
}

/* Benchmark section layout */
#benchmark .benchmark-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

#benchmark .benchmark-image {
  width: 100%;
}

#benchmark .benchmark-image img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

#benchmark .benchmark-text h3 {
  margin-top: 0;
}

#benchmark .benchmark-text p {
  margin-top: 8px;
}

@media (max-width: 768px) {
  #benchmark .benchmark-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #benchmark .benchmark-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .processor-image {
    display: none !important;
  }
  #home .home-content {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .home-text {
    padding: 24px 8px 8px 8px;
  }

  body {
    padding: 2px;
  }

  main {
    padding: 2px;
  }

  section {
    margin-bottom: 30px;
    padding: 16px;
  }  

  #home .profile-picture img {
    max-width: 160px; /* Limit the image size on small screens */
    margin: 0 auto;    /* Center the image horizontally */
    display: block;    /* Ensure margin auto works */
  }

  /* Mobile navigation: show only brand and language link */
  nav {
    justify-content: space-between;
    align-items: center;
  }
  
  nav .nav-links {
    display: flex;
    gap: 0;
    margin-left: auto; /* Push to the right */
    padding-right: 16px; /* Add padding from the right edge */
  }
  
  /* Hide all nav links except language link on mobile */
  nav .nav-links a:not(.language-link) {
    display: none;
  }
  
  .quicopt-brand {
    font-size: 1.2rem;
    margin-right: 16px;
    margin-left: 8px;
    position: static; /* Reset absolute positioning */
    transform: none;
  }
  
  /* Make YouTube video responsive on mobile */
  iframe {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  /* Stack contact grid on mobile */
  #contact .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #contact .contact-avatar {
    width: 120px;
    /* height: 120px; */
  }
}

.highlighted-publications li strong {
  color: var(--primary-blue);
}