/* --- Global Variables & Basic Styling --- */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --background-color: #f8f9fa;
  --text-color: #34495e;
  --card-background: #ffffff;
  --border-color: #ecf0f1;
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Lato', sans-serif;
}

body {
  font-family: var(--body-font);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.7;
  margin: 0;
  font-size: 16px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1, h2, h3 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  font-weight: 700;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* --- Header & Footer --- */
.site-header {
  background: var(--card-background);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0; padding-bottom: 0;
}
.site-title {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}
.site-nav .page-link { margin-left: 1.5rem; }

.site-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: #7f8c8d;
}

/* --- HOME LAYOUT (CV) --- */
.home-layout .hero {
  text-align: center;
  padding: 4rem 1rem;
  background-color: var(--card-background);
  border-bottom: 1px solid var(--border-color);
}
.home-layout .profile-picture {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--border-color);
  margin-bottom: 1.5rem;
}
.home-layout .hero h1 { font-size: 2.8rem; margin: 0; }
.home-layout .hero .tagline { font-size: 1.2rem; color: #7f8c8d; margin-top: 0.5rem; }

.home-layout .content-section {
  background: var(--card-background);
  padding: 2.5rem;
  margin-top: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.home-layout .content-section h2 {
  margin-top: 0;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}
.home-layout .community-list { list-style-type: none; padding-left: 0; }
.home-layout .community-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}
.home-layout .community-list li:last-child { border-bottom: none; }
.home-layout .community-list li::before {
  content: '→';
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-right: 1rem;
}

/* --- Post List (Homepage & Blog Page) --- */
.post-list { list-style: none; padding: 0; }
.post-item { margin-bottom: 2rem; }
.post-item:last-child { margin-bottom: 0; }
.post-item h3 a { color: var(--primary-color); }
.post-item h3 a:hover { color: var(--secondary-color); }
.post-meta { font-size: 0.9rem; color: #7f8c8d; margin-bottom: 0.5rem; }
.read-more { font-weight: bold; display: inline-block; margin-top: 0.5rem; }

/* --- PAGE LAYOUT --- */
.page-layout .page-container {
  background-color: var(--card-background);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.page-layout .page-container h1 {
  font-size: 2.5rem;
  margin-top: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* --- POST LAYOUT --- */
.post-layout .post-article {
  background-color: var(--card-background);
  padding: 2rem 2.5rem 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.post-layout .post-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}
.post-layout .post-header h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 1rem; }
.post-layout .post-meta { color: #7f8c8d; font-size: 1rem; }
.post-layout .post-content { font-size: 1.1rem; line-height: 1.8; }
.post-layout .post-content h2, .post-layout .post-content h3 {
  margin-top: 2.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;
}
.post-layout .post-content blockquote {
  margin-left: 0; padding: 0.5rem 1.5rem; border-left: 4px solid var(--secondary-color);
  font-style: italic; color: #555; background-color: #f9f9f9;
}
.post-layout .post-content pre {
  background-color: #2d2d2d; color: #f8f8f2; padding: 1rem 1.5rem;
  border-radius: 5px; overflow-x: auto; font-size: 0.9rem;
}
.post-layout .post-content img {
  max-width: 100%; height: auto; display: block; margin: 2rem auto;
  border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .site-header .container { flex-direction: column; }
  .site-title { margin-bottom: 1rem; }
  .site-nav { margin-top: 0.5rem; }
  .home-layout .hero h1 { font-size: 2.2rem; }
  .content-section, .page-container, .post-article { padding: 1.5rem; }
  .post-layout .post-header h1 { font-size: 2.4rem; }
}
