/* 
 * Custom additions for Lennart Lopin's personal website
 * Includes GitHub integration, publications section, and theme switching styles
 */

/* CSS Variables for theme colors */
:root {
  --primary-color: #343a40;
  --secondary-color: #6c757d;
  --background-color: #ffffff;
  --text-color: #212529;
  --card-bg: #ffffff;
  --border-color: rgba(0,0,0,0.125);
}

[data-theme="dark"] {
  --primary-color: #61dafb;
  --secondary-color: #adb5bd;
  --background-color: #121212;
  --text-color: #f8f9fa;
  --card-bg: #1e1e1e;
  --border-color: rgba(255,255,255,0.125);
}

/* Apply theme variables */
body[data-theme="dark"] {
  color: var(--text-color);
  background-color: var(--background-color);
  transition: all 0.3s ease;
}

body[data-theme="dark"] .card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

body[data-theme="dark"] .section-title {
  color: var(--primary-color);
}

/* GitHub section styles */
.github-profile .card-body {
  padding: 2rem;
}

.github-stats {
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 1rem 0;
}

.github-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.github-stats .stat-item strong {
  font-size: 1.5rem;
  font-weight: 700;
}

.contribution-graph {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 1rem;
  overflow: hidden;
}

#github-projects .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#github-projects .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.tech-stack {
  margin-top: 1rem;
}

.tech-stack .badge {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Publications section styles */
.publication-filters {
  margin-bottom: 2rem;
}

.publication-card {
  transition: transform 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-5px);
}

.publication-year {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #e9ecef;
  border-radius: 4px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
}

.publication-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.publication-venue {
  color: #6c757d;
  font-style: italic;
  margin-bottom: 1rem;
}

.publication-abstract {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.abstract-content {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9rem;
}

.research-metrics {
  display: flex;
  justify-content: space-around;
  margin: 1.5rem 0;
}

.metric-item {
  text-align: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #343a40;
}

.metric-label {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Citation modal styles */
#citation-modal pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  white-space: pre-wrap;
}

/* Theme switch styles */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.theme-label {
  margin-left: 10px;
  font-size: 0.9rem;
  color: var(--text-color);
}