/* Custom styles for quantitative research documentation */

/* Grid layout for cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Card styling */
.card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card h3 {
  margin-top: 0;
  color: var(--md-primary-fg-color);
  font-weight: 600;
}

/* Enhanced buttons */
.md-button {
  margin: 0.25rem 0.5rem 0.25rem 0;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.md-button--stretch {
  width: 100%;
  text-align: center;
  margin: 1rem 0;
}

.md-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Project highlight boxes */
.project-highlight {
  background: linear-gradient(135deg, var(--md-primary-fg-color--light), var(--md-accent-fg-color--light));
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  color: white;
}

.project-highlight h3 {
  color: white;
  margin-top: 0;
}

/* Performance metrics styling */
.performance-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.metric {
  background: var(--md-code-bg-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--md-code-font);
  font-weight: 600;
  border-left: 3px solid var(--md-accent-fg-color);
}

/* Code blocks and syntax highlighting */
.highlight {
  border-radius: 6px;
  margin: 1rem 0;
}

/* Math expressions */
.arithmatex {
  margin: 0.5em 0;
}

/* Enhanced tables */
table {
  border-collapse: collapse;
  margin: 1.5em 0;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table th,
table td {
  border: 1px solid var(--md-default-fg-color--lighter);
  padding: 0.8em 1.2em;
  text-align: left;
}

table th {
  background-color: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
}

table tbody tr:nth-child(even) {
  background-color: var(--md-default-fg-color--lightest);
}

table tbody tr:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

/* Research-specific styling */
.research-metric {
  background-color: var(--md-code-bg-color);
  padding: 0.3em 0.6em;
  border-radius: 4px;
  font-family: var(--md-code-font);
  font-weight: 500;
}

.performance-highlight {
  background: linear-gradient(90deg, var(--md-accent-fg-color--transparent), transparent);
  padding: 0.2em 0.5em;
  border-left: 4px solid var(--md-accent-fg-color);
  margin: 0.8em 0;
  border-radius: 0 4px 4px 0;
}

/* Image styling for charts */
img[alt*="chart"], img[alt*="plot"], img[alt*="analysis"] {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 1.5em 0;
  max-width: 100%;
  height: auto;
}

/* Admonition enhancements */
.admonition {
  border-radius: 6px;
  margin: 1.5rem 0;
}

.admonition.success {
  border-color: #4caf50;
}

.admonition.info {
  border-color: #2196f3;
}

/* Navigation enhancements */
.md-nav__item--active > .md-nav__link {
  font-weight: 600;
}

/* Responsive design */
@media screen and (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .performance-metrics {
    flex-direction: column;
  }
}

