/* Hide the right-side table of contents globally */
.md-sidebar--secondary {
  display: none !important;
}

/* Custom styles for Evolvable Hardware website */

:root {
  --primary-color: #3f51b5;
  --accent-color: #00bcd4;
  --text-primary: #212121;
  --text-secondary: #757575;
  --background-light: #fafafa;
  --gradient-primary: linear-gradient(135deg, #3f51b5, #00bcd4);
}

/* Header enhancements */
.md-header {
  background: var(--gradient-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.md-header-nav__title {
  font-weight: 700;
  font-size: 1.2rem;
}

/* Hero section styling for home page */
.hero {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin: -1rem -1rem 2rem -1rem;
  border-radius: 0 0 1rem 1rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Card-style content blocks */
.feature-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-card h3 {
  color: var(--primary-color);
  margin-top: 0;
}

/* Research area highlights */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.research-item {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 8px;
  border-top: 3px solid var(--accent-color);
}

.research-item h4 {
  color: var(--text-primary);
  margin-top: 0;
}

/* Navigation enhancements */
.md-nav__item--active > .md-nav__link {
  color: var(--primary-color);
  font-weight: 600;
}

/* Ensure section headings always clear floated images */
.md-typeset h2 {
  clear: both;
}

/* Code block styling */
.highlight pre {
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
}

/* Admonition customization */
.md-typeset .admonition.info {
  border-left-color: var(--primary-color);
}

.md-typeset .admonition.tip {
  border-left-color: var(--accent-color);
}

/* Footer styling */
.md-footer {
  background: var(--gradient-primary);
  color: white;
}

.md-footer-nav {
  color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .research-grid {
    grid-template-columns: 1fr;
  }
}

/* Publication list styling */
.publication-list {
  list-style: none;
  padding: 0;
}

.publication-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: box-shadow 0.3s ease;
}

.publication-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.publication-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.publication-authors {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.publication-venue {
  color: var(--text-primary);
  font-weight: 500;
}

/* Custom table styling */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(63, 81, 181, 0.2);
  box-shadow: none;
}

.md-typeset table:not([class]) th {
  background: #edf0fb;
  color: var(--primary-color);
  font-weight: 600;
}

.md-typeset table:not([class]) td {
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.md-typeset table:not([class]) tbody tr:nth-child(odd) td {
  background: #f9f9ff;
}

/* Button styling */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: white;
  text-decoration: none;
}

/* Icon styling */
.icon-large {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* Timeline styling for history page */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 4rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--primary-color);
  border-radius: 50%;
}

.timeline-year {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Contact form styling */
.contact-form {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Experiment result rows — image on top, text below */
.result-row {
  margin: 1.5rem 0;
}

.result-row figure {
  max-width: 100%;
  margin: 0 0 1rem 0;
  text-align: center;
}

.result-row figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.result-row figure figcaption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.result-row p {
  margin: 0 0 1rem 0;
}

/* Equation images — smaller and centered */
.result-row figure.equation {
  max-width: 600px;
  margin: 1rem auto;
}

.result-row figure.equation img {
  max-width: min(100%, 600px);
  max-height: 150px;
  width: auto;
}

/* Experiment difficulty indicators */
.beginner { color: #4caf50; }
.intermediate { color: #ff9800; }
.advanced { color: #f44336; }

/* EHW group paper legend */
.ehw-legend {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}