/* Site-wide custom styles extracted from base.njk */
/* New Header styles */
.site-header {
  display: flex; /* Aligns image and text side-by-side */
  align-items: center; /* Vertically centers the items */
  gap: 1.5rem; /* Adds space between the image and text */
  margin-bottom: 2rem;
}

.profile-image {
  width: 100px;
  height: 100px;
  border-radius: 50%; /* This is the CSS that makes it a circle */
  object-fit: cover; /* Prevents the image from stretching */
  border: 3px solid var(--text-color); /* Uses Water.css's color */
}

.site-header h2 {
  margin: 0; /* Removes default heading margin */
}

/* Navigation styles */
nav {
  background-color: var(--background);
  border: 1px solid var(--text-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

nav a {
  text-decoration: none;
  font-weight: bold;
  margin-right: 1.5rem;
}

nav a[aria-current=page] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

/* Social links */
.social-links {
  display: flex;
  gap: 1.5rem; /* Space between links */
  margin-top: 1.5rem;
  padding-left: 0.5rem; /* Aligns with nav text */
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* Space between icon and text */
  text-decoration: none; /* No underlines */
  font-weight: bold;
  color: var(--text-color); /* Matches your site's text color */
  opacity: 0.8; /* Slightly faded */
}

/* Simple hover effect */
.social-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Icon sizes */
.social-links svg {
  width: 24px;
  height: 24px;
}

/* FIX: Override Water.css's automatic mail emoji */
.social-links a[href^="mailto:"]::before {
  content: none;
}

/* --- Tag Cloud Styles --- */
.tag-list {
  margin: 0.5rem 0 1rem 0;
  padding: 0.75rem;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list h3 {
  margin: 0 0 0.5rem 0;
  width: 100%;
}

a.tag-link {
  display: inline-block;
  background: rgba(128, 128, 128, 0.2);
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: 16px;
  text-decoration: none;
  font-size: 0.9rem;
}

a.tag-link:hover {
  background: rgba(128, 128, 128, 0.4);
  color: var(--text-color);
  text-decoration: none;
}

/* A simple divider with smaller margins */
hr.lite-divider {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border: 0;
  border-top: 1px solid var(--text-color);
  opacity: 0.5;
}

/* Mermaid diagram container - scrollable and zoomable */
.mermaid-zoom-wrapper {
  position: relative;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  margin: 1rem 0;
  background: var(--background);
  overflow: hidden;
  max-height: 80vh;
  height: 600px;
}

.mermaid {
  padding: 1rem;
  cursor: move;
  cursor: grab;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mermaid:active {
  cursor: grabbing;
}

.mermaid svg {
  max-width: none !important;
  max-height: none !important;
  display: block;
}

.mermaid-controls {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  z-index: 10;
  background: var(--background);
  border: 1px solid var(--text-color);
  border-radius: 4px;
  padding: 0.25rem;
}

.mermaid-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--text-color);
  background: var(--background);
  color: var(--text-color);
  cursor: pointer;
  border-radius: 4px;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mermaid-controls button:hover {
  background: rgba(128, 128, 128, 0.2);
}

/* Unified entry meta styles */
.entry-meta {
  background: rgba(128, 128, 128, 0.15);
  padding: 0.75rem 1rem;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.entry-meta .dates {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.entry-meta .summary {
  margin: 0;
  font-style: italic;
  opacity: 0.95;
}

.entry-meta .status-line {
  margin: 0.5rem 0 0 0;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: capitalize;
}

.status-badge.status-draft,
.status-badge.status-design-draft {
  background: #ffc107;
  color: #000;
}

.status-badge.status-in-progress,
.status-badge.status-active {
  background: #2196f3;
  color: #fff;
}

.status-badge.status-complete,
.status-badge.status-done {
  background: #4caf50;
  color: #fff;
}

.entry {
  margin-bottom: 2rem;
}

/* Entry list & cards for indexes */
.entry-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: grid;
  gap: 1rem;
}

.entry-card {
  border: 1px solid var(--text-color);
  border-radius: 8px;
  padding: 1rem;
  background: var(--background);
}

.entry-card-title {
  margin: 0 0 0.25rem 0;
}

.entry-card-meta {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.entry-card-summary {
  margin: 0;
}

.entry-card-tags {
  margin: 0.5rem 0 0 0;
}

.entry-card-tags .tag-link {
  margin-right: 0.5rem;
}
