/* Base Reset and Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #007bff; /* A nice blue for primary actions */
  --secondary-color: #6c757d; /* A muted gray for secondary actions */
  --text-color-dark: #333333;
  --text-color-light: #f8f8f8;
  --bg-color-light: #ffffff;
  --bg-color-dark: #f4f4f4;
  --border-color-light: #cccccc;
  --shadow-light: rgba(0, 0, 0, 0.7);
}

html, body {
  height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif; /* Prioritize Inter, fallback to Segoe UI */
  line-height: 1.6;
  background: var(--bg-color-light);
  color: var(--text-color-dark);
  transition: background 0.3s ease, color 0.3s ease;

  /* Make body a flex container to stack header, page content, and footer vertically */
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensure body takes at least the full viewport height */
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: #000;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem; /* Increased padding */
  box-shadow: 0 2px 10px var(--shadow-light); /* Subtle shadow */
  z-index: 1000; /* Ensure header is above other content */
  flex-shrink: 0; /* Prevent header from shrinking */
}

.logo {
  font-weight: 700; /* Bolder font weight */
  font-size: 1.8rem; /* Larger logo font */
}

nav a {
  margin-left: 30px; /* Increased spacing between nav items */
  color: #fff;
  font-size: 1rem; /* Slightly larger nav font */
  transition: color 0.3s ease;
  position: relative; /* For underline effect */
}

nav a:hover, .logo a:hover {
  color: var(--primary-color); /* Hover color */
  text-decoration: none; /* Remove default underline */
}

/* Underline effect on hover */
nav a::after, .logo a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
  left: 0;
  background: var(--primary-color);
}


/* Hero Section (for index.html) */
.hero {
  padding: 4rem 2rem; /* More vertical padding */
  text-align: center;
  background: linear-gradient(180deg, #eaf4ff 0%, #ffffff 100%); /*Subtle gradient background */
  border-bottom: 1px solid #e0e0e0;
}

.hero h1 {
  font-size: 3.2rem; /* Significantly increased font size */
  font-weight: 1000; /* Bolder */
  margin-bottom: 2rem; /* More space below title */
  line-height: 1.2; /* Tighter line height for large text */
  color: #1c2e41; /* Darker, more impactful color */
}

.hero p {
  font-size: 1.15rem; /* Larger paragraph text */
  max-width: 800px; /* Limit width for readability */
  margin: 0 auto 2.5rem auto; /* Center and add more space below */
  color: #555;
}

.hero .buttons {
  margin-top: 1.5rem; /* More space above buttons */
}

.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem; /* Increased padding for larger buttons */
  margin: 0.7rem; /* Increased margin between buttons */
  border-radius: 8px; /* More rounded corners */
  font-weight: 600; /* Semi-bold text */
  transition: all 0.3s ease; /* Smooth transitions for all properties */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add shadow */
}

.btn:hover{
  background: #0056b3; 
  transform: translateY(-2px); 
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

/* Section Titles on index.html*/
.section-title {
  font-size: 2.2rem; /* Consistent large titles for sections */
  font-weight: 600;
  text-align: center;
  margin-bottom: 2.5rem; /* More space below titles */
  color: #2c3e50;
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}


/* Video Section (for index.html) */
.home-video {
  text-align: center;
  padding: 4rem 2rem; /* More padding */
  background-color: #f8f8f8; /* Slightly different background */
  border-bottom: 1px solid #e0e0e0;
}

.video-container {
  position: relative;
  width: 900px;
  height: 506px;
  margin: 0 auto;
}

/* Adjust video size for mobile - keep aspect ratio */
@media (max-width: 1060px) {
  .video-container {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  }
}


.video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 1);
  overflow: hidden;
}

/* News Section (for index.html) */
.news {
  text-align: center;
  padding: 4rem 2rem;
}

.news-box {
  margin: 1.5rem auto;
  width: 100%;
  max-width: 900px;
  height: 600px; /* Set a static height */
  background-color: var(--bg-color-light);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  padding: 2rem;
  color: #555;
  font-size: 1.1rem;
  line-height: 1.5;
  overflow-y: auto;
  display: block; 
  text-align: center;
}

.news-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); /* Subtle shadow for each item */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-item:last-child {
    margin-bottom: 0; /* No bottom margin for the last item */
}

.news-item:hover {
    transform: translateY(-3px); /* Slight lift on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}

.news-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.news-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.news-item h3 a:hover {
    text-decoration: underline;
}

.news-item .news-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}


/* Page Layout */
/* Documentation, About, and Download pages */
.page {
  display: flex;
  flex: 1; /* Allow .page to take up all available vertical space between header and footer */
  max-width: 1200px; /* Limit overall width for readability */
  margin: 20px auto; /* Center the page content */
  background-color: var(--bg-color-light);
  box-shadow: 0 0 10px var(--shadow-light); /* Subtle shadow around the content block */
  border-radius: 8px; /* Rounded corners for the container */
  overflow: hidden; /* Important: Contain children, prevent scrollbar on .page itself */
  min-height: 0; /* Allows flex item to shrink below content size */
}

aside {
  width: 280px; /* Slightly wider sidebar */
  background: #c0c6cf;
  padding: 1.5rem;
  display: flex;
  flex-direction: column; /* To make nav inside flex vertically */
  border-right: 1px solid #b0b6bf;
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  height: 100%; /* Make aside stretch to the full height of its parent (.page) */
  overflow-y: auto; /* Allow sidebar to scroll independently if content is too long */
}

aside nav {
    flex: 1; /* Make nav fill available height within aside */
    display: flex; /* Apply flex to nav to manage its children */
    flex-direction: column;
}

aside nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

aside nav ul li {
  margin-bottom: 5px; 
}

aside nav ul li a {
  padding: 0.8rem 1rem; /* Padding for click area */
  display: block; /* Make the whole area clickable */
  color: var(--text-color-dark);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 4px; /* Slightly rounded links */
  font-size: 1rem;
}

aside nav ul li a:hover {
  background: #9ea8b66b;
  color: var(--text-color-dark);
  text-decoration: none; /* Remove underline on hover */
}



/* Styling for different heading levels in the sidebar if needed */
aside nav ul li a.nav-level-h1 { font-weight: bold; margin-top: 15px; }
aside nav ul li a.nav-level-h2 { margin-left: 5px; }
aside nav ul li a.nav-level-h3 { margin-left: 50px; font-size: 0.95rem; }


main {
  flex: 1; 
  padding: 3rem; 
  height: 100%; 
  overflow-y: auto; 
}

/* --- Markdown Content Styling (within main-content) --- */
/* Basic Markdown styling to make the README content look good */
#main-content h1, #main-content h2, #main-content h3, #main-content h4, #main-content h5, #main-content h6 {
    margin-top: 1.5em; /* Space above headings */
    margin-bottom: 0.5em; /* Space below headings */
    color: #2c3e50;
    line-height: 1.2;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee; 
}

#main-content h1 { font-size: 2.5rem; }
#main-content h2 { font-size: 2rem; }
#main-content h3 { font-size: 1.6rem; }
#main-content h4 { font-size: 1.3rem; }

#main-content p {
    margin-bottom: 1em; 
}

#main-content code {
    font-family: 'Courier New', Courier, monospace;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 1em;
    background-color: #0000004f;
    color: white;
}

#main-content pre {
    background-color: #00000027;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto; 
    margin-bottom: 1.5em;
    font-size: 1em;
}

#main-content ul, #main-content ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

#main-content li {
    margin-bottom: 0.5em;
}

#main-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

#main-content a:hover {
    color: #0056b3;
    text-decoration: none;
}

#main-content img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
    margin: 1em 0;
}

#main-content details {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 1em;
}

#main-content summary {
    cursor: pointer;
    font-weight: bold;
    padding: 5px 0;
}

#main-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2em 0;
}


/* Footer */
footer {
  margin-top: auto;
  background: #000000; 
  color: #eee;
  padding: 0.5rem 2rem; 
  border-top: 2px solid #333;
  display: grid;
  grid-template-columns: auto 1fr auto; 
  align-items: center;
  gap: 10px;

  flex-shrink: 0; /* Prevent footer from shrinking */
}

footer img {
    width: 250px; 
    height: auto;
    filter: brightness(0) invert(1); 
}

.team-logo {
    width: 100px;
    justify-self: end; 
}

.footer-links {
  display: flex;
  flex-direction: column; 
  gap: 10px; 
  align-items: center;
  margin: 0; 
  grid-column: 2;
}

.footer-links a {
  font-size: 1rem;
  color: #bbb;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-bottom {
  font-size: 0.9rem; 
  color: #999;
  width: 100%; 
  text-align: center;
  grid-column: 2; 
  margin-top: 1rem; 
}

/* Responsive */
@media (max-width: 1200px) {
  footer {
    grid-template-columns: 1fr; /* Stack all items in a single column */
    justify-items: center; /* Center items horizontally in the column */
    padding: 1rem;
    gap: 1rem;
  }

  footer img {
      margin: 0; /* Remove specific margins */
  }

  .team-logo {
      justify-self: center; /* Center the team logo in the column */
  }

  .footer-links {
    grid-column: 1; /* Ensure it's in the single column */
    width: auto; /* Let content determine width */
  }

  .footer-bottom {
    grid-column: 1; /* Ensure it's in the single column */
    margin-top: 0.5rem; /* Adjust margin for mobile */
  }
}

.footer-bottom a {
  color: #bbb;
}

.footer-bottom a:hover {
  color: var(--primary-color);
}


/* Responsive */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.5rem; /* Adjust for medium screens */
  }
  .section-title {
    font-size: 1.8rem;
  }
  .video-player {
    max-width: 100%; /* Ensure it fits */
  }
}

@media (max-width: 1200px) {
  header {
    flex-direction: column;
    padding: 1rem;
  }
  nav {
    margin-top: 1rem;
  }
  nav a {
    margin: 0 10px;
    font-size: 0.9rem;
  }
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 2rem; /* Smaller on small screens */
  }
  .hero p {
    font-size: 1rem;
  }
  .btn {
    padding: 0.6rem 1.5rem;
    margin: 0.4rem;
  }
  /* Responsive adjustments for the .page layout on docs.html and About.html */
  .page {
    flex-direction: column; /* Stack sidebar and content vertically */
    margin: 10px;
    box-shadow: none; /* Remove shadow for smaller screens */
    flex: none; /* Let its content define its height on mobile */
    min-height: auto; /* Remove min-height */
    height: auto; /* Allow content to dictate height */
    overflow: visible; /* Allow content to flow naturally on mobile */
  }
  aside {
    width: 100%; /* Sidebar takes full width */
    border-right: none;
    border-bottom: 1px solid #b0b6bf; /* Add bottom border */
    padding: 1rem;
    height: auto; /* Allow height to be determined by content on mobile */
    overflow-y: visible; /* Or auto if you want internal scrollbars on mobile */
  }
  main {
    padding: 1.5rem 1rem; /* Adjust content padding */
    height: auto; /* Allow height to be determined by content on mobile */
    overflow-y: visible; /* Or auto if you want internal scrollbars on mobile */
  }
  aside nav ul li a {
    padding: 0.6rem 0.5rem; /* Adjust padding for smaller screens */
    font-size: 0.95rem;
  }
  aside nav ul li a.nav-level-h2,
  aside nav ul li a.nav-level-h3 {
    margin-left: 0; /* Remove indentation on small screens */
  }
  .news-box {
    padding: 1.5rem;
  }
  /* Footer adjustments for mobile */
  footer {
    flex-direction: column; /* Stack footer elements vertically */
    gap: 0.5rem;
  }
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  nav a {
    margin: 0 5px;
  }
}

/* Contact Page */
.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  flex: 1; 
  min-height: 0; 
  overflow-y: auto; 
  max-width: 1400px;
  width: 100%;
  margin: auto;
  background-color: var(--bg-color-light);
  box-shadow: 0 0 10px var(--shadow-light);
  border-radius: 8px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 450px;
  gap: 1.2rem;
  margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

.contact-form .btn {
  background: #fff;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form .btn:hover {
  background: #333;
  color: #fff;
}

/* Publication Page */
.publications-list {
  margin: 1.5rem auto;
  width: 100%; 
  max-width: 1200px; 
  background-color: var(--bg-color-light);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  padding: 1rem;
  display: block;
  text-align: left;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem;
}

.publication-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.publication-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.publication-item h3 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.publication-authors {
  font-style: italic;
  color: #666;
  margin-bottom: 0.5rem;
}

.publication-venue {
  color: #555;
  margin-bottom: 0.5rem;
}

.publication-date {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.publication-description {
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.publication-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.publication-buttons .btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: #fff;
  background-color: #1c87f8; 
  border: none;
  transition: background-color 0.2s;
}

.publication-buttons .btn:hover {
  background-color: #0056b3; 
}
