/* ==========================================================================
   Custom styles that go beyond plain Tailwind utility classes.
   Tailwind (via CDN) handles almost everything else directly in the HTML.
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* Smooth theme transition when toggling dark / light mode */
body,
header,
footer,
section {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ---------- Nav links (desktop) ---------- */
.nav-link {
  color: #475569; /* slate-600 */
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #6366f1; /* indigo-500 */
}
.dark .nav-link {
  color: #cbd5e1; /* slate-300 */
}
.dark .nav-link:hover {
  color: #818cf8; /* indigo-400 */
}

/* ---------- Nav links (mobile) ---------- */
.nav-link-mobile {
  display: block;
  padding: 0.6rem 0.25rem;
  border-radius: 0.5rem;
  color: #475569;
}
.nav-link-mobile:hover {
  background-color: #f1f5f9;
  color: #6366f1;
}
.dark .nav-link-mobile {
  color: #cbd5e1;
}
.dark .nav-link-mobile:hover {
  background-color: #1e293b;
  color: #818cf8;
}

/* ---------- Social icon buttons ---------- */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.social-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}
.social-icon:hover {
  color: #6366f1;
  border-color: #a5b4fc;
  transform: translateY(-2px);
}
.dark .social-icon {
  color: #cbd5e1;
  border-color: #334155;
}
.dark .social-icon:hover {
  color: #818cf8;
  border-color: #6366f1;
}

/* ---------- Tag pills (About section skills) ---------- */
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background-color: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
}
.dark .tag-pill {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* ---------- Article / blog cards ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.12);
  border-color: #c7d2fe;
}
.dark .post-card {
  background-color: #1e293b;
  border-color: #334155;
}
.dark .post-card:hover {
  border-color: #6366f1;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.4);
}

/* Clamp excerpt text to 3 lines without extra plugins */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* ---------- Form inputs ---------- */
.form-input {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  padding: 0.65rem 0.9rem;
  font-size: 0.925rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.dark .form-input {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

/* ---------- Article modal ---------- */
#article-modal.flex {
  display: flex;
}

/* ---------- Misc ---------- */
::selection {
  background-color: #c7d2fe;
}
