/* ===========================================
   Typography - Using Google Fonts
   =========================================== */

/* Import elegant fonts */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&display=swap');

/* CSS Variables for easy customization */
:root {
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  --color-text: #333;
  --color-text-muted: #666;
  --color-link: #0066cc;
  --color-link-hover: #004499;
  --color-border: #e5e5e5;
  --color-bg: #fff;
  
  --max-width: 800px;
}

/* Base styles */
body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 0;
}

/* ===========================================
   Header and Navigation
   =========================================== */

header.site-header {
  margin: 32px 0 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

header h1.site-name {
  font-family: var(--font-sans);
  font-size: 1.75em;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

header h1.site-name a {
  color: var(--color-text);
  text-decoration: none;
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
}

header nav ul li a {
  font-family: var(--font-sans);
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.95em;
  transition: color 0.2s ease;
}

header nav ul li a:hover {
  color: var(--color-link);
}

/* ===========================================
   Section styling
   =========================================== */

section {
  margin-bottom: 48px;
}

section h2,
h2 {
  font-family: var(--font-sans);
  font-size: 1.4em;
  font-weight: 600;
  margin: 0 0 24px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.15em;
  font-weight: 600;
  margin: 1.5em 0 0.75em;
}

p {
  margin: 0 0 1em;
}

/* ===========================================
   Profile / About section
   =========================================== */

.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.profile-content {
  flex: 1;
  min-width: 320px;
}

.profile-image {
  flex: 0 0 180px;
  text-align: center;
}

.profile-image img {
  width: 100%;
  max-width: 180px;
  border-radius: 4px;
  object-fit: cover;
}

.links {
  margin-top: 20px;
  font-family: var(--font-sans);
  font-size: 0.95em;
}

.links a {
  color: var(--color-link);
}

/* ===========================================
   Publications styling
   =========================================== */

.publication-item {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 32px;
  gap: 20px;
}

.publication-image {
  flex: 0 0 140px;
}

.publication-image img {
  width: 100%;
  max-width: 140px;
  border-radius: 2px;
}

.publication-content {
  flex: 1;
  min-width: 280px;
}

.publication-content strong {
  font-weight: 600;
}

.publication-content em {
  color: var(--color-text-muted);
}

.publication-content p {
  font-size: 0.95em;
  margin-top: 8px;
  color: var(--color-text-muted);
}

/* ===========================================
   Thesis styling
   =========================================== */

.thesis-item {
  margin-bottom: 32px;
}

.thesis-item strong {
  font-weight: 600;
}

/* ===========================================
   Blog list styling
   =========================================== */

.blog-list ul.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-list ul.recent-posts li {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.blog-date {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  font-size: 0.9em;
  min-width: 120px;
}

.view-all {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 0.95em;
  color: var(--color-link);
}

/* ===========================================
   Footer
   =========================================== */

footer.site-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.9em;
  color: var(--color-text-muted);
}

footer.site-footer a {
  color: var(--color-text-muted);
}

footer.site-footer a:hover {
  color: var(--color-link);
}

/* ===========================================
   Links
   =========================================== */

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* ===========================================
   Blog post styles
   =========================================== */

.post-header {
  margin-bottom: 32px;
}

.post-header h1.post-title {
  font-family: var(--font-sans);
  font-size: 2em;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.post-meta {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.post-tags {
  margin-top: 8px;
}

.tag {
  display: inline-block;
  background: #f0f0f0;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.8em;
  margin-right: 6px;
  font-family: var(--font-sans);
  color: var(--color-text-muted);
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 2em;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 4px;
}

.post-content blockquote {
  border-left: 3px solid var(--color-link);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Code blocks */
.post-content pre {
  background: #f7f7f7;
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.9em;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-content p code,
.post-content li code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
}

.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.95em;
}

/* Blog index page */
.blog-index .post-list {
  list-style: none;
  padding: 0;
}

.blog-index .post-list li {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.blog-index .post-preview h2 {
  font-size: 1.3em;
  margin: 0 0 8px;
}

.blog-index .post-preview h2 a {
  color: var(--color-text);
}

.blog-index .post-preview h2 a:hover {
  color: var(--color-link);
  text-decoration: none;
}

.blog-index .post-preview time {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.blog-index .post-preview p {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-size: 0.95em;
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 0 16px;
  }
  
  .profile-container,
  .publication-item {
    flex-direction: column;
  }
  
  .profile-image {
    order: -1;
    margin-bottom: 16px;
  }
  
  .publication-image {
    text-align: center;
    margin-bottom: 12px;
  }
  
  header nav ul {
    gap: 16px;
  }
  
  .post-header h1.post-title {
    font-size: 1.6em;
  }
  
  .blog-list ul.recent-posts li {
    flex-direction: column;
    gap: 4px;
  }
}
