@charset "UTF-8";

/* --- Font stack --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

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

/* --- Custom animations --- */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out both;
}

.animate-fade-in-delay {
  animation: fade-in 0.6s ease-out 0.2s both;
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out both;
}

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.dark html {
  scrollbar-color: #475569 transparent;
}

/* --- Prose improvements --- */
.prose img {
  max-width: 100%;
  height: auto;
}

.prose pre {
  overflow-x: auto;
  border-radius: 0.75rem;
}

.prose blockquote {
  border-left-color: #2563eb;
  font-style: italic;
}

/* --- Line clamp fallback (Tailwind v4 uses newer syntax) --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Print styles --- */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  .prose {
    max-width: 100% !important;
  }
}

/* --- Mobile menu transition --- */
#mobile-menu {
  transition: transform 0.3s ease-in-out;
}

/* --- Card hover --- */
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* --- Selection --- */
::selection {
  background: #2563eb;
  color: #fff;
}

.dark ::selection {
  background: #3b82f6;
  color: #fff;
}
