/* Blog Main Styles - Matching Portfolio Aesthetic */

/* Base Typography */
body {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations matching portfolio */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

/* Navigation hover effects */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: rgb(0, 0, 0);
}

.dark .nav-link:hover {
  color: rgb(255, 255, 255);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Dark mode toggle button */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

.dark .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Code blocks - matching portfolio aesthetic */
pre {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark pre {
  border-color: rgba(255, 255, 255, 0.1);
}

code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Inline code */
:not(pre) > code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
}

.dark :not(pre) > code {
  background: rgba(255, 255, 255, 0.1);
}

/* Links in content */
article a {
  color: rgb(24, 24, 27);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.dark article a {
  color: rgb(250, 250, 250);
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

article a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.8);
}

.dark article a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

/* Headings in articles */
article h2, article h3 {
  scroll-margin-top: 100px;
}

/* Selection color matching portfolio */
::selection {
  background: rgba(0, 0, 0, 0.1);
}

.dark ::selection {
  background: rgba(255, 255, 255, 0.2);
}

/* Smooth transitions */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Reading progress bar (optional) */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: rgb(0, 0, 0);
  z-index: 100;
  transition: width 0.1s ease;
}

.dark .reading-progress {
  background: rgb(255, 255, 255);
}

/* Tag pills */
.tag-pill {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: rgb(63, 63, 70); /* zinc-700 */
  transition: all 0.2s ease;
}

.dark .tag-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgb(212, 212, 216); /* zinc-300 */
}

.tag-pill:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.dark .tag-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}