/* Color Scheme Variables */
:root {
  --bg-primary: #2C3E50;
  --bg-secondary: #34495E;
  --text-primary: #ECF0F1;
  --text-bright: #FFFFFF;
  --accent-blue: #3498DB;
  --accent-grey: #95A5A6;
  --hover-bg: #3d5268;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 18px;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
header {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--bg-secondary);
}

header h1 {
  font-size: 2.5rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

header .tagline {
  font-size: 1.1rem;
  color: var(--accent-grey);
  font-style: italic;
  margin-bottom: 2rem;
}

/* Navigation */
nav {
  margin-top: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

nav a:hover {
  color: var(--accent-blue);
  background-color: var(--hover-bg);
}

/* Main Content */
main {
  padding: 3rem 0;
}

/* Article List */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-preview {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.article-preview h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.article-preview h2 a {
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-preview h2 a:hover {
  color: var(--accent-blue);
}

.article-meta {
  color: var(--accent-grey);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-preview .summary {
  color: var(--text-primary);
  line-height: 1.6;
}

/* Single Article */
article.single {
  background-color: var(--bg-secondary);
  padding: 3rem;
  border-radius: 8px;
}

article.single h1 {
  font-size: 2.5rem;
  color: var(--text-bright);
  margin-bottom: 1rem;
  line-height: 1.3;
}

article.single .content {
  margin-top: 2rem;
}

article.single h2 {
  font-size: 1.8rem;
  color: var(--text-bright);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

article.single h3 {
  font-size: 1.4rem;
  color: var(--accent-blue);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

article.single p {
  margin-bottom: 1.2rem;
}

article.single a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

article.single a:hover {
  border-bottom-color: var(--accent-blue);
}

/* Tags and Categories */
.tags, .scientific-domains {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag, .domain {
  background-color: var(--bg-primary);
  color: var(--accent-blue);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.tag:hover, .domain:hover {
  background-color: var(--hover-bg);
}

/* Post Navigation */
.post-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-primary);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.nav-previous, .nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-next {
  text-align: right;
}

.nav-label {
  font-size: 0.85rem;
  color: var(--accent-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-navigation a {
  color: var(--text-bright);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  border-bottom: none;
}

.post-navigation a:hover {
  color: var(--accent-blue);
}

/* When only one navigation link exists */
.post-navigation:has(.nav-previous:only-child) {
  grid-template-columns: 1fr;
}

.post-navigation:has(.nav-next:only-child) {
  grid-template-columns: 1fr;
  justify-items: end;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 2px solid var(--bg-secondary);
  margin-top: 4rem;
  color: var(--accent-grey);
  font-size: 0.9rem;
}

/* Code blocks */
pre {
  background-color: #1e272e;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--accent-blue);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--accent-grey);
  font-style: italic;
}

/* Social Share Buttons */
.share-buttons {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-primary);
}

.share-buttons h3 {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.share-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.share-button.twitter:hover {
  background-color: #1DA1F2;
  border-color: #1DA1F2;
  color: white;
}

.share-button.facebook:hover {
  background-color: #1877F2;
  border-color: #1877F2;
  color: white;
}

.share-button.linkedin:hover {
  background-color: #0A66C2;
  border-color: #0A66C2;
  color: white;
}

.share-button.reddit:hover {
  background-color: #FF4500;
  border-color: #FF4500;
  color: white;
}

.share-button.whatsapp:hover {
  background-color: #25D366;
  border-color: #25D366;
  color: white;
}

.share-button.email:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.share-button svg {
  width: 20px;
  height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  article.single {
    padding: 2rem 1.5rem;
  }
  
  .article-preview {
    padding: 1.5rem;
  }
}
