/* ============================================
   INKWELL BLOG — Shared Styles
   ============================================ */

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Base Typography */
body {
  font-family: 'Inter', sans-serif;
}

.font-serif {
  font-family: 'Playfair Display', serif;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #ff4f10 0%, #ff7338 50%, #c62606 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Effect */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(255, 79, 16, 0.25);
}

/* Navigation Link Underline Animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff4f10, #ff7338);
  transition: width 0.3s;
}
.nav-link:hover::after {
  width: 100%;
}

/* Hero Dot Pattern */
.hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,79,16,0.15) 1px, transparent 0);
  background-size: 24px 24px;
}
.dark .hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,115,56,0.2) 1px, transparent 0);
}

/* Text Selection */
::selection {
  background: #ff4f10;
  color: white;
}

/* Reading Progress Bar (for post pages) */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff4f10, #ff7338);
  z-index: 100;
  width: 0%;
  transition: width 0.1s linear;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Table of Contents — Active State */
.toc-link {
  transition: all 0.2s;
}
.toc-link.active {
  color: #ff4f10;
  border-left-color: #ff4f10;
  font-weight: 600;
}
.dark .toc-link.active {
  color: #ff7338;
}

/* Code Block Copy Button */
pre {
  position: relative;
}
.copy-code-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}
pre:hover .copy-code-btn {
  opacity: 1;
}
.copy-code-btn:hover {
  color: white;
  background: rgba(30, 41, 59, 1);
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: #1c1917;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(1rem);
  transition: all 0.3s;
  pointer-events: none;
}
#toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dark #toast {
  background: white;
  color: #1c1917;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #ff4f10;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Line Clamp Utility */
/* Line Clamp Utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* Added standard property to fix warning */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3; /* Added standard property to fix warning */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prose Customization */
.prose h2 {
  scroll-margin-top: 6rem;
}
.prose h3 {
  scroll-margin-top: 6rem;
}

/* Mobile Menu Animation */
#mobile-menu {
  transition: all 0.3s ease;
}