/* Main stylesheet for viswanathgs.github.io */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* CSS Custom Properties */
:root {
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --color-primary: #111827;
  --color-secondary: #555;
  --color-light: #718096;
  --color-border: #f3f4f6;
  --underline-light: #9ca3af;
  --underline-dark: #4b5563;
}

/* Prevent scrollbar-induced shifting */
html {
  overflow-y: scroll;
}

/* Base styles */
body { 
  font-family: var(--font-primary);
  max-width: 700px; 
  margin: 60px auto; 
  padding: 0 30px; 
  line-height: 1.7; 
  color: var(--color-primary); 
  font-size: 14px;
  font-weight: 400;
  background-color: #ffffff;
}

/* Header styles */
.header { 
  display: flex; 
  justify-content: space-between; 
  align-items: baseline; 
  margin-bottom: 30px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 15px;
}

h1 { 
  font-size: 1.3em; 
  font-weight: 600; 
  margin: 0; 
  border-bottom: none;
  color: #111827;
  letter-spacing: -0.01em;
}

h1 a { 
  color: #111827; 
  text-decoration: none; 
}

h1 a:hover { 
  color: #111827; 
}

h2 { 
  font-size: 1.1em; 
  font-weight: 600; 
  margin-top: 0; 
  margin-bottom: 10px; 
  color: #555;
}

/* Navigation styles */
.nav { 
  font-size: 15px; 
  font-family: var(--font-primary);
}

.nav a { 
  color: var(--color-light);
  text-decoration: none;
  margin-left: 24px;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--underline-dark);
  text-underline-offset: 2px;
}

/* Link styles */
a { 
  color: #374151; 
  text-decoration: underline; 
  text-decoration-color: var(--underline-light);
  text-underline-offset: 2px;
}

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

/* Content styles */
.content {
  margin-top: 30px;
}

/* Image styles */
.content img {
  max-width: 100%;
  height: auto;
  margin: 30px auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content h2:first-child {
  margin-top: 0;
  margin-left: 0;
  font-weight: 600;
  color: #111827;
  font-size: 1.4em;
  line-height: 1.3;
  margin-bottom: 15px;
}

.content .post-meta {
  margin-left: 0;
  font-size: 15px;
  color: #555;
  margin-bottom: 40px;
  font-weight: 500;
}

/* Tighter line spacing for blog post content only */
.content .post-meta ~ p,
.content .post-meta ~ div p,
.content h2 ~ p {
  line-height: 1.5;
}

/* Post-specific styles */
.post-meta {
  font-size: 14px;
  color: #555;
  margin-bottom: 50px;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.post-title {
  margin-bottom: 10px;
}

/* Blog listing styles */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f3f4f6;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list h3 {
  margin: 0 0 5px 0;
  font-size: 1.1em;
  font-weight: 600;
}

.post-list h3 a,
.post-list a {
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.post-list h3 a:hover,
.post-list a:hover {
  text-decoration: underline !important;
  text-decoration-color: var(--underline-dark) !important;
  text-underline-offset: 2px;
}

/* Date styling */
.post-list .post-date,
.post-date {
  font-size: 14px;
  color: var(--color-secondary);
  font-weight: 500;
}

/* Social links styles */
.social { 
  margin-top: 0; 
  margin-bottom: 25px;
  font-size: 13px; 
  font-family: var(--font-primary);
}

.social a { 
  margin-right: 20px; 
  color: var(--color-light); 
  font-weight: 400;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.social a:hover {
  color: var(--color-primary);
  text-decoration: underline !important;
  text-decoration-color: var(--underline-dark) !important;
  text-underline-offset: 2px;
}

p {
  margin-bottom: 20px;
}

/* List styles */
ul {
  list-style: none;
  padding-left: 0;
  margin: 30px 0;
}

ul li:before {
  content: "• ";
  color: #ccc;
  margin-right: 12px;
}

ul li {
  margin-bottom: 8px;
  padding-left: 0;
}

ol {
  padding-left: 20px;
  margin: 30px 0;
}

ol li {
  margin-bottom: 8px;
}

/* Social/external links wrapper - no underline by default */
.social-links a {
  text-decoration: none !important;
}

.social-links a:hover {
  text-decoration: underline !important;
  text-decoration-color: var(--underline-dark) !important;
  text-underline-offset: 2px;
}
