/* ======================================
   1. General Styles
   ====================================== */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--primary-background);
  color: var(--primary-text);
}

a {
  text-decoration: none;
  color: var(--link-color);
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

/* ======================================
   2. Layout Components
   ====================================== */
header, footer {
  background: var(--headfoot-background);
  color: var(--headfoot-text);
  text-align: center;
  padding: 1em 0;
}

footer {
  background: var(--headfoot-background);
}

header {
  background-image: var(--header-background);
  background-size: cover;
  background-blend-mode: overlay;
}

main {
  padding: 20px;
}

/* Navigation */
nav {
  margin: 0;
  padding: 10px;
  text-align: right;
}

nav a {
  margin: 0 10px;
  color: var(--nav-text);
  display: inline-block;
  background: var(--accent-color-primary);
  padding: 10px 15px;
  border-radius: 5px;
  width: var(--nav-link-width, auto);
  text-align: center;
  box-sizing: border-box;
}

footer a {
  color: var(--impressum-nav);
}

/* ======================================
   3. News Page
   ====================================== */
.news-item {
  background-color: var(--secondary-background);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--news-box-shadow);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.news-date {
  color: var(--news-date-color);
  font-size: 0.9em;
  margin-bottom: 8px;
}

.news-title {
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 15px;
  color: var(--accent-color-primary);
}

.news-content {
  line-height: 1.5;
}

.news-item a {
  color: var(--link-color);
  font-weight: bold;
}

/* ======================================
   4. Publications Page
   ====================================== */
.author-highlight {
  font-weight: bold;
  color: var(--accent-color-secondary);
}

.publication-list {
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.publication-list h2 {
  margin-bottom: 1rem;
  border-bottom: var(--title-underline);
  padding-bottom: 0.5rem;
}

.publication-list ul {
  list-style-type: none;
  padding-left: 1rem;
}

.publication-list li {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.doi-link {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--accent-color-tertiary);
}

/* ======================================
   5. CV/Vita Page
   ====================================== */

.profile-summary {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5em;
  background: var(--profile-background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--profile-shadow);
  border-left: var(--highlight-border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  float: center;
}

.profile-summary img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1.5em;
  border: var(--cv-image-border);
  box-shadow: var(--shadow-secondary);
}

.profile-summary h1 {
  color: var(--accent-color-primary);
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 2rem;
}

.profile-summary p {
  font-size: 1.05em;
  line-height: 1.6;
  color: var(--secondary-text);
  margin-bottom: 0;
}

.cv {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: var(--secondary-background);
  border-radius: 8px;
  box-shadow: var(--shadow-primary);
}

.cv h2 {
  border-bottom: var(--title-underline);
  padding-bottom: 5px;
  margin-bottom: 20px;
  color: var(--accent-color-secondary);
}

.vita {
  list-style: none;
  padding: 0;
}

.vita li {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--tertiary-background);
  border-left: var(--highlight-border);
  border-radius: 4px;
}

.vita li strong {
  display: block;
  font-size: 1.1em;
  color: var(--secondary-text);
}

.vita li .details {
  margin-top: 5px;
  font-size: 0.95em;
  color: var(--tertiary-text);
}

.vita li:last-child {
  margin-bottom: 0;
}

.featured-course {
  border-left: var(--highlight-border);
  position: relative;
  background: var(--featured-courses-background);
}

.featured-course a {
  color: var(--accent-color-secondary);
}

/* ======================================
   6. Visualization/Timeline Page
   ====================================== */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  width: 4px;
  background-color: var(--accent-color-primary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 20px;
  background-color: var(--tertiary-background);
  border-radius: 10px;
  box-shadow: var(--shadow-primary);
}

.timeline-left .timeline-content {
  float: left;
  margin-left: -5%;
}

.timeline-right .timeline-content {
  margin-left: 55%;
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--accent-color-primary);
  border-radius: 50%;
  top: 20px;
  left: 50%;
  margin-left: -10px;
  z-index: 1;
}

.timeline-container::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive: Timeline switches to one-column on mobile */
@media (max-width: 900px) {
  .timeline-line {
    left: 20px;
    margin-left: 0;
  }
  .timeline-content {
    width: 90%;
    margin-left: 40px !important;
    float: none !important;
  }
  .timeline-left .timeline-content,
  .timeline-right .timeline-content {
    margin-left: 40px !important;
  }
  .timeline-dot {
    left: 20px;
    margin-left: -10px;
  }
}

.module-title {
  color: var(--accent-color-primary);
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 10px;
}

.module-description {
  margin-bottom: 15px;
}

.module-topics {
  font-size: 0.9em;
  font-style: italic;
  color: var(--tertiary-text);
}

.course-header {
  text-align: center;
  margin-bottom: 40px;
  color: var(--accent-color-primary);
}

.course-info {
  text-align: center;
  margin-bottom: 20px;
  font-size: 0.95em;
  color: var(--secondary-text);
}

.optional-module {
  border-left: var(--optional-module-border);
  position: relative;
}

/* ======================================
   7. Common Components
   ====================================== */
.register-button {
  display: inline-block;
  background-color: var(--accent-color-primary);
  color: var(--nav-text);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 15px;
  font-weight: bold;
}

.register-button:hover {
  background-color: var(--hover-button-bg);
}

/* Badge styles */
.optional-badge, .featured-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: bold;
  color: var(--primary-text);
}

.optional-badge {
  background-color: var(--accent-color-tertiary); 
}

.featured-badge {
  background-color: var(--accent-color-secondary);
}

/* ======================================
   8. Social Media
   ====================================== */
.social-media {
  width: 100%;
  background-color: var(--secondary-background);
  border-top: var(--social-media-border);
  border-bottom: var(--social-media-border);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  left: 0;
  bottom: -20px;
  margin: 0;
  padding: 1px 0;
  z-index: 2;
}

.social-media a {
  display: inline-block;
  margin: 2px 8px; /* Increased horizontal margin from 2px to 8px */
  transition: all 0.2s ease;
}

/* Fixed the selector (was missing the dot) */
.social-media img, .social-media span, .social-media svg {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.social-media a:hover {
  background-color: var(--social-media-hover);
  border-radius: 5px;
}

.social-media a:hover img, .social-media a:hover span, .social-media a:hover svg {
  transform: scale(1.1);
}

/* Mobile responsive styles for larger social media icons on mobile */
@media (max-width: 768px) {
  .social-media {
    padding: 12px 0;
    justify-content: space-around;
  }
  .social-media img, .social-media span, .social-media svg {
    transform: scale(1.8);
    margin-left: 6px;
  }
}

/* Mobile responsive styles for profile summary */
@media (max-width: 768px) {
  .profile-summary {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
  }
  
  .profile-summary img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    height: auto;
  }
  
  .profile-summary h1 {
    text-align: center;
  }
}

/* ======================================
   9. Blog Posts
   ====================================== */
.blog-post {
  max-width: 800px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
  line-height: 1.7;
}

.blog-post h1 {
  color: var(--accent-color-primary);
  margin-bottom: 20px;
  font-size: 2em;
}

.blog-post h2 {
  color: var(--accent-color-primary);
  margin: 30px 0 15px;
  font-size: 1.5em;
  border-bottom: var(--title-underline);
  padding-bottom: 5px;
}

.blog-meta {
  display: flex;
  margin-bottom: 30px;
  font-size: 0.9em;
  color: var(--tertiary-text);
}

.blog-date {
  margin-right: 15px;
}

.blog-date:before {
  content: "📅 ";
}

.blog-category:before {
  content: "🏷️ ";
}

.blog-content p {
  margin-bottom: 20px;
}

.blog-image {
  margin: 30px 0;
  text-align: center;
}

.blog-image img {
  max-width: 100%;
  border-radius: 5px;
  box-shadow: var(--shadow-primary);
}

.blog-image figcaption {
  margin-top: 10px;
  font-style: italic;
  color: var(--tertiary-text);
  font-size: 0.9em;
}

.blog-content ul, .blog-content ol {
  margin: 20px 0 20px 30px;
}

.blog-content li {
  margin-bottom: 10px;
}

.blog-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: var(--blog-post-border-title);
}

.tag {
  display: inline-block;
  background: var(--hashtag-background);
  color: var(--hashtag-color);
  padding: 5px 10px;
  margin-right: 8px;
  border-radius: 20px;
  font-size: 0.8em;
}

.tag:before {
  content: "#";
}

/* Link to load this full post from the news page */
.read-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-color-primary);
  font-weight: bold;
}

.read-more:after {
  content: " →";
}

/* --- Impressum Page Styles --- */
.impressum-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 900px;
  margin: 40px auto 20px auto;
  background: var(--secondary-background);
  border-radius: 12px;
  box-shadow: var(--shadow-tertiary);
  padding: 32px 24px;
}

.impressum-col {
  flex: 1 1 320px;
  min-width: 280px;
}

.impressum-details h2,
.impressum-explanation h2 {
  color: var(--accent-color-primary);
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.3em;
}

.impressum-details p,
.impressum-explanation p {
  margin-bottom: 16px;
  font-size: 1em;
  color: var(--secondary-text);
}

.impressum-details strong {
  color: var(--accent-color-secondary);
}

.impressum-explanation a {
  color: var(--accent-color-secondary);
  text-decoration: underline;
}

@media (max-width: 800px) {
  .impressum-container {
    flex-direction: column;
    padding: 18px 8px;
    gap: 20px;
  }
}

.nightmodebutton {
  background: var(--accent-color-primary);
  border: none;
  color: var(--nav-text);
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  box-shadow: var(--shadow-secondary);
  transition: background-color 0.3s ease;
}
