/* Theme Toggle Button */

.theme-toggle {
  background: none;
  border: 1px solid #e9ecef;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #555;
  transition: all 0.2s ease;
  margin: 1rem 0;
}

.theme-toggle:hover {
  background: #f8f9fa;
  color: #0366d6;
}

/* Sidebar Image */

.sidebar-image {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.sidebar-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.sidebar-image img:hover {
  opacity: 1;
}

/* Dark Mode Styles */

[data-theme="dark"] {
  --bg-color: #1a1a2e;
  --text-color: #e4e4e7;
  --text-muted: #a1a1aa;
  --border-color: #3f3f46;
  --card-bg: #27273a;
  --link-color: #60a5fa;
}

[data-theme="dark"] body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

[data-theme="dark"] .wrapper {
  background-color: var(--bg-color);
}

[data-theme="dark"] header h1 a,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: var(--text-color);
}

[data-theme="dark"] header p {
  color: var(--text-muted);
}

[data-theme="dark"] a {
  color: var(--link-color);
}

[data-theme="dark"] .site-nav {
  border-color: var(--border-color);
}

[data-theme="dark"] .site-nav a {
  color: var(--text-muted);
}

[data-theme="dark"] .site-nav a:hover,
[data-theme="dark"] .site-nav a.active {
  color: var(--link-color);
}

[data-theme="dark"] .site-nav a.active {
  border-left-color: var(--link-color);
}

[data-theme="dark"] .theme-toggle {
  border-color: var(--border-color);
  color: var(--text-muted);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--card-bg);
  color: var(--link-color);
}

[data-theme="dark"] .project-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .project-card h3 {
  color: var(--text-color);
}

[data-theme="dark"] .project-card p {
  color: var(--text-muted);
}

[data-theme="dark"] .project-card a {
  color: var(--link-color);
}

[data-theme="dark"] .post-preview {
  border-color: var(--border-color);
}

[data-theme="dark"] .post-preview h3 a {
  color: var(--text-color);
}

[data-theme="dark"] .post-preview p {
  color: var(--text-muted);
}

[data-theme="dark"] .post-meta {
  color: var(--text-muted);
}

[data-theme="dark"] .post-header,
[data-theme="dark"] .post-footer {
  border-color: var(--border-color);
}

[data-theme="dark"] footer p,
[data-theme="dark"] footer small {
  color: var(--text-muted);
}

[data-theme="dark"] hr {
  border-color: var(--border-color);
}

[data-theme="dark"] code {
  background: var(--card-bg);
  color: var(--text-color);
}

[data-theme="dark"] .sidebar-image {
  border-color: var(--border-color);
}

/* Navigation Styles */

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.site-nav a {
  display: block;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.site-nav a i {
  width: 1.25rem;
  margin-right: 0.5rem;
  text-align: center;
}

.site-nav a:hover {
  color: #0366d6;
}

.site-nav a.active {
  color: #0366d6;
  border-left: 3px solid #0366d6;
  padding-left: 0.5rem;
}

/* Blog Styles */

.posts-list {
  margin: 1.5rem 0;
}

.post-preview {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e9ecef;
}

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

.post-preview h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.post-preview h3 a {
  color: #333;
  text-decoration: none;
}

.post-preview h3 a:hover {
  color: #0366d6;
}

.post-meta {
  color: #777;
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
}

.post-preview p {
  margin: 0.5rem 0;
  color: #555;
  line-height: 1.6;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.post-header h1 {
  margin: 0 0 0.5rem 0;
}

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

.post-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Project Portfolio Styles */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.project-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.project-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: #333;
}

.project-card p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
}

.project-card a {
  color: #0366d6;
  text-decoration: none;
  font-weight: 500;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Responsive grid for larger screens */
@media (min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
