:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222, 47%, 11%);
  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(222, 47%, 11%);
  --primary: hsl(217, 91%, 60%);
  --primary-foreground: hsl(210, 40%, 98%);
  --secondary: hsl(210, 40%, 96%);
  --secondary-foreground: hsl(222, 47%, 11%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215, 25%, 27%);
  --accent: hsl(210, 40%, 96%);
  --accent-foreground: hsl(222, 47%, 11%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --border: hsl(214, 32%, 91%);
  --input: hsl(214, 32%, 91%);
  --ring: hsl(217, 91%, 60%);
  --radius: 0.75rem;
  --font-family: 'Inter', system-ui, sans-serif;
}

.dark {
  --background: hsl(222, 47%, 11%);
  --foreground: hsl(210, 40%, 98%);
  --card: hsl(222, 47%, 11%);
  --card-foreground: hsl(210, 40%, 98%);
  --popover: hsl(222, 47%, 11%);
  --popover-foreground: hsl(210, 40%, 98%);
  --primary: hsl(217, 91%, 60%);
  --primary-foreground: hsl(222, 47%, 11%);
  --secondary: hsl(217, 33%, 17%);
  --secondary-foreground: hsl(210, 40%, 98%);
  --muted: hsl(217, 33%, 17%);
  --muted-foreground: hsl(215, 20%, 65%);
  --accent: hsl(217, 33%, 17%);
  --accent-foreground: hsl(210, 40%, 98%);
  --destructive: hsl(0, 63%, 31%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --border: hsl(217, 33%, 17%);
  --input: hsl(217, 33%, 17%);
  --ring: hsl(217, 91%, 60%);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html::-webkit-scrollbar {
  display: none;
}

html {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Header styles */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  padding: 1.25rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 0.75rem;
}

.logo {
  height: 2rem;
  width: auto;
}

.company-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: #000000;
  letter-spacing: -0.025em;
}

.dark .company-name {
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
}

.powered-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.powered-by:hover {
  color: var(--foreground);
}

.yeeth-logo {
  height: 1.5rem;
  width: auto;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Blog header */
.blog-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.blog-title {
  font-size: 3rem !important;
  font-weight: 800;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-align: center;
}

.dark .blog-title {
  background: linear-gradient(135deg, var(--primary) 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* Search section */
.search-section {
  margin-bottom: 3rem;
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-left: 3rem;
  background-color: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--foreground);
  font-family: var(--font-family);
  transition: all 0.2s ease;
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.search-input::placeholder {
  color: var(--muted-foreground);
  font-weight: 400;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

/* Post list */
.post-list {
  display: grid;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.post {
  background: var(--card);
  border: 1px solid #000000;
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.dark .post {
  border: 1px solid #ffffff;
}

.post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .post:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.post-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  text-decoration: none;
  border-radius: calc(var(--radius) - 1px);
}

.post h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
  position: relative;
  z-index: 2;
}

.post-meta {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.post p {
  color: var(--muted-foreground);
  line-height: 1.7;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* Section headers */
section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--foreground);
}

/* Blog post content styles */
.blog-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 2rem 0 1rem 0;
  color: var(--foreground);
  line-height: 1.2;
}

.blog-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: var(--foreground);
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--foreground);
}

.blog-content p {
  margin: 1rem 0;
  color: var(--foreground);
}

/* Fixed bullet point styles */
.blog-content ul,
.blog-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-content li {
  margin: 0.5rem 0;
  padding-left: 0.5rem;
}

.blog-content ul li {
  list-style-type: disc;
}

.blog-content ol li {
  list-style-type: decimal;
}

.blog-content li::marker {
  color: var(--primary);
}

.blog-content ul ul,
.blog-content ol ol,
.blog-content ul ol,
.blog-content ol ul {
  margin: 0.5rem 0 0.5rem 1rem;
}

/* Blockquote styles */
.blog-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.blog-content blockquote p {
  margin: 0;
  color: var(--muted-foreground);
}

/* Code block styles */
.blog-content pre {
  background: #1a1b26;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid #2a2b3c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-content code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.blog-content pre code {
  background: none;
  padding: 0;
  color: #c0caf5;
}

.blog-content :not(pre) > code {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Modern Syntax Highlighting Theme (Light-focused) */
.hljs { color: #c0caf5; background: #1a1b26; }
.hljs-keyword { color: #bb9af7; font-weight: 600; }
.hljs-built_in { color: #ff9e64; }
.hljs-type { color: #7dcfff; }
.hljs-literal { color: #ff9e64; }
.hljs-number { color: #ff9e64; }
.hljs-string { color: #9ece6a; }
.hljs-attr { color: #7dcfff; }
.hljs-function { color: #7aa2f7; }
.hljs-title { color: #7aa2f7; }
.hljs-params { color: #c0caf5; }
.hljs-comment { color: #565f89; font-style: italic; }
.hljs-doctag { color: #bb9af7; }
.hljs-meta { color: #7dcfff; }
.hljs-meta-keyword { color: #bb9af7; }
.hljs-tag { color: #f7768e; }
.hljs-name { color: #f7768e; }
.hljs-variable { color: #c0caf5; }
.hljs-regexp { color: #b4f9f8; }
.hljs-symbol { color: #e0af68; }
.hljs-template-variable { color: #c0caf5; }
.hljs-template-tag { color: #f7768e; }
.hljs-addition { background: rgba(158, 206, 106, 0.2); }
.hljs-deletion { background: rgba(247, 118, 142, 0.2); }
.hljs-strong { font-weight: 600; }
.hljs-emphasis { font-style: italic; }

/* Table styles */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog-content th,
.blog-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.blog-content th {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  font-weight: 600;
  color: var(--foreground);
}

.blog-content tr:hover {
  background: color-mix(in srgb, var(--primary) 2%, transparent);
}

/* Link styles */
.blog-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.blog-content a:hover {
  border-bottom-color: var(--primary);
}

/* Footer */
.site-footer {
  padding: 1.5rem 0;
  background: var(--background);
  margin-top: auto;
  font-family: var(--font-family);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-links {
    justify-content: flex-start;
  }
}

.footer-link-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.footer-link-item:hover {
  color: var(--foreground);
}

.footer-link-item svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.8;
}

.footer-copyright {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-copyright {
    text-align: right;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .blog-title {
    font-size: 2rem;
  }
  
  .blog-description {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .post {
    padding: 1.5rem;
  }
  
  .site-footer {
    padding: 1.25rem 0;
  }
  
  .blog-content h1 {
    font-size: 2rem;
  }
  
  .blog-content h2 {
    font-size: 1.75rem;
  }
  
  .blog-content h3 {
    font-size: 1.25rem;
  }
  
  .blog-content pre {
    padding: 1rem;
    margin: 1rem -1rem;
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .company-name {
    font-size: 1.1rem;
  }
  
  .post h3 {
    font-size: 1.25rem;
  }
  
  .footer-content {
    gap: 1.5rem;
  }
  
  .blog-content ul,
  .blog-content ol {
    padding-left: 1.25rem;
  }
}

@media (max-width: 480px) {
  .post {
    padding: 1.25rem;
  }
  
  .blog-title {
    font-size: 1.75rem;
  }
  
  section h2 {
    font-size: 1.5rem;
  }
  
  .footer-links {
    gap: 1rem;
  }
}

/* Reduce padding in blog header */
.blog-header {
  padding: 1rem 0 !important;
  border-bottom: none !important;
}

/* Post preview images */
.post-image-preview {
  margin: -2rem -2rem 1.5rem -2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
  max-height: 200px;
}

.post-image-preview img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* Featured post images */
.post-featured-image {
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px; /* Match the blog content width */
}

.post-featured-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .post-title {
    font-size: 2.5rem !important;
  }
  
  .post-featured-image {
    max-height: 400px;
  }
  
  .post-featured-image img {
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 2rem !important;
  }
  
  .post-featured-image {
    max-height: 300px;
  }
  
  .post-featured-image img {
    max-height: 300px;
  }
}

/* Blog post title - centered and large */
.post-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.post-title {
  font-size: 3rem !important;
  font-weight: 800;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-align: center;
}

.dark .post-title {
  background: linear-gradient(135deg, var(--primary) 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Remove separator after image */
.post-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: none; /* Remove the border */
  margin-bottom: 0; /* Remove bottom margin */
}

/* Make featured image match text width */
.post-featured-image {
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px; /* Match the blog content width */
}

.blog-content {
  margin-top: 0; /* Remove top margin from content */
  padding-top: 0; /* Remove top padding from content */
}

/* Ensure first element in blog content has no top margin */
.blog-content > *:first-child {
  margin-top: 0 !important;
}

.post-featured-image img {
  width: 100%; /* Full width */
  height: auto;
  max-height: 500px; /* Increased height */
  object-fit: cover; /* Change back to cover to fill frame */
  display: block;
}

img {
  width: 100%; /* Full width */
  height: auto;
  max-height: 500px; /* Increased height */
  object-fit: cover; /* Change back to cover to fill frame */
  display: block;
}