/* =========================================================
   Czeal Visual Polish
   Lightweight, CSS-first, GPU-friendly, reduced-motion aware.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --accent-1: #6366f1;   /* indigo-500 */
  --accent-2: #8b5cf6;   /* violet-500 */
  --accent-3: #d946ef;   /* fuchsia-500 */
  --glow-light: 0 10px 40px -10px rgba(99, 102, 241, .25);
  --glow-dark: 0 10px 40px -10px rgba(139, 92, 246, .45);
}

/* ---------- Global smoothness ---------- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Gentle page fade-in on every page */
body {
  animation: page-in .55s var(--ease-out) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Selection */
::selection {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  color: #fff;
}

/* Focus ring — premium, violet */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .7s var(--ease-out),
    transform .7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger helpers — max 6 to keep it predictable */
.reveal[data-delay="1"].is-visible { transition-delay: .08s; }
.reveal[data-delay="2"].is-visible { transition-delay: .16s; }
.reveal[data-delay="3"].is-visible { transition-delay: .24s; }
.reveal[data-delay="4"].is-visible { transition-delay: .32s; }
.reveal[data-delay="5"].is-visible { transition-delay: .40s; }
.reveal[data-delay="6"].is-visible { transition-delay: .48s; }

/* ---------- Hero section ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Two soft gradient blobs behind the hero text */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
  animation: blob-float 14s ease-in-out infinite alternate;
}

.hero::before {
  top: -120px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--accent-1), transparent 60%);
}

.hero::after {
  bottom: -160px;
  right: -140px;
  background: radial-gradient(circle at 70% 70%, var(--accent-3), transparent 60%);
  animation-delay: -7s;
  opacity: .28;
}

.dark .hero::before { opacity: .45; }
.dark .hero::after  { opacity: .38; }

@keyframes blob-float {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(20px, -15px, 0) scale(1.05); }
  100% { transform: translate3d(-10px, 10px, 0) scale(.98); }
}

/* Faint masked grid pattern behind the hero */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  pointer-events: none;
}

.dark .hero-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
}

/* Gradient text accent (used sparingly) */
.text-gradient {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: gradient-pan 8s linear infinite;
}

@keyframes gradient-pan {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ---------- Hero "pill" badge ---------- */
.hero-badge {
  position: relative;
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}

.hero-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

/* ---------- Primary CTA button ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  background-size: 200% 200%;
  color: #fff !important;
  transition:
    transform .3s var(--ease-out),
    box-shadow .3s var(--ease-out),
    background-position .6s var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 100%;
  box-shadow: var(--glow-light);
}

.dark .btn-primary:hover { box-shadow: var(--glow-dark); }

/* Shine sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--ease-out);
  pointer-events: none;
}

.btn-primary:hover::after { left: 125%; }

/* Secondary / ghost button */
.btn-ghost {
  transition:
    transform .3s var(--ease-out),
    border-color .3s var(--ease-out),
    background-color .3s var(--ease-out);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

/* ---------- Article cards ---------- */
.card-interactive {
  position: relative;
  isolation: isolate;
  transition:
    transform .4s var(--ease-out),
    border-color .4s var(--ease-out),
    box-shadow .4s var(--ease-out);
}

.card-interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, .35);
  box-shadow: var(--glow-light);
}

.dark .card-interactive:hover { box-shadow: var(--glow-dark); }

/* Colored ring/glow on hover — pure CSS, no repaint-heavy shadow */
.card-interactive::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.card-interactive:hover::before { opacity: 1; }

/* Arrow slide inside card link */
.card-interactive a[href]:not([class*="text-2xl"]) {
  display: inline-block;
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}

.card-interactive:hover a[href]:not([class*="text-2xl"]) {
  transform: translateX(3px);
}

/* ---------- Nav links ---------- */
.nav-link {
  position: relative;
  transition: color .3s var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease-out);
  border-radius: 2px;
}

.nav-link:hover::after { transform: scaleX(1); }

/* ---------- Related article links ---------- */
.related-link {
  display: inline-block;
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}

.related-link:hover {
  transform: translateX(4px);
  color: var(--accent-2);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  transition:
    transform .3s var(--ease-out),
    border-color .3s var(--ease-out),
    background-color .3s var(--ease-out);
}

.theme-toggle:hover {
  transform: rotate(-8deg) scale(1.05);
  border-color: var(--accent-2);
}

.theme-toggle:active { transform: scale(.95); }

/* Icon swap — two spans, one visible depending on theme */
.theme-icon-light { display: inline; }
.theme-icon-dark  { display: none; }
.dark .theme-icon-light { display: none; }
.dark .theme-icon-dark  { display: inline; }

/* ---------- Contact form polish ---------- */
.form-field {
  transition:
    border-color .3s var(--ease-out),
    box-shadow .3s var(--ease-out),
    transform .3s var(--ease-out);
  border: 1px solid transparent;
}

.form-field:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
  transform: translateY(-1px);
}

/* ---------- Scrollbar (subtle, premium) ---------- */
@media (pointer: fine) {
  body::-webkit-scrollbar { width: 10px; }
  body::-webkit-scrollbar-track { background: transparent; }
  body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .18);
    border-radius: 10px;
  }
  .dark body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); }
  body::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }
}

/* ---------- Reduced motion — respect user preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }
  .hero::before,
  .hero::after { animation: none !important; }
  .text-gradient { animation: none !important; }
}

/* ---------- Mobile tap polish ---------- */
@media (hover: none) {
  .card-interactive:hover { transform: none; box-shadow: none; }
  .card-interactive:active { transform: scale(.99); transition-duration: .15s; }
  .btn-primary:active { transform: scale(.98); }
  .btn-ghost:active { transform: scale(.98); }
}

/* iOS tap highlight removal */
a, button {
  -webkit-tap-highlight-color: transparent;
}



/* =========================================================
   Platform v2 — premium cards, tools, footer, mobile nav
   ========================================================= */

/* ---------- Typography refinements ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
}

/* ---------- Article card v2 ---------- */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
  background: #fff;
  border: 1px solid rgb(229 231 235);
  transition:
    transform .4s var(--ease-out),
    border-color .4s var(--ease-out),
    box-shadow .4s var(--ease-out);
}

.dark .article-card {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, .4);
  box-shadow: var(--glow-light);
}

.dark .article-card:hover { box-shadow: var(--glow-dark); }

/* Thumbnail — 16:9, gradient fallback */
.article-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
}

.article-card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 255, 255, .18),
    transparent 55%
  );
  pointer-events: none;
}

.article-card:hover .article-card-thumb > span {
  transform: scale(1.08) rotate(-3deg);
}

.article-card-thumb > span {
  transition: transform .5s var(--ease-out);
  display: inline-block;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .25));
}

/* Thumbnail gradient variants (per topic) */
.thumb-indigo  { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.thumb-violet  { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.thumb-fuchsia { background: linear-gradient(135deg, #d946ef, #ec4899); }
.thumb-cyan    { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.thumb-emerald { background: linear-gradient(135deg, #10b981, #06b6d4); }
.thumb-amber   { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.thumb-slate   { background: linear-gradient(135deg, #334155, #1e293b); }

/* Card body */
.article-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .75rem;
  color: rgb(107 114 128);
}

.dark .article-card-meta { color: rgb(161 161 170); }

.article-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: currentColor;
  opacity: .5;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .625rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 9999px;
  background: rgba(139, 92, 246, .1);
  color: var(--accent-2);
  border: 1px solid rgba(139, 92, 246, .2);
}

.dark .category-badge {
  background: rgba(139, 92, 246, .15);
  border-color: rgba(139, 92, 246, .3);
}

.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.article-card-excerpt {
  color: rgb(75 85 99);
  line-height: 1.6;
  font-size: .9375rem;
}

.dark .article-card-excerpt { color: rgb(161 161 170); }

.article-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  margin-top: auto;
  transition: color .3s var(--ease-out), gap .3s var(--ease-out);
}

.article-card:hover .article-card-cta {
  color: var(--accent-2);
  gap: .625rem;
}

/* Full-width stretched link (entire card clickable) */
.article-card-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Featured card — spans full width on desktop */
.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: 1.2fr 1fr;
  }
  .featured-card .article-card-thumb {
    aspect-ratio: auto;
    height: 100%;
    min-height: 320px;
    font-size: 5rem;
  }
  .featured-card .article-card-body {
    padding: 2.5rem;
    gap: 1.25rem;
  }
  .featured-card .article-card-title {
    font-size: 2rem;
    line-height: 1.2;
  }
}

/* ---------- Tool card ---------- */
.tool-card {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgb(229 231 235);
  transition:
    transform .3s var(--ease-out),
    border-color .3s var(--ease-out),
    box-shadow .3s var(--ease-out);
}

.dark .tool-card {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, .4);
  box-shadow: var(--glow-light);
}

.dark .tool-card:hover { box-shadow: var(--glow-dark); }

.tool-card.is-coming-soon {
  opacity: .7;
  pointer-events: none;
}

.tool-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.tool-card-body {
  flex: 1;
  min-width: 0;
}

.tool-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.tool-card-desc {
  font-size: .875rem;
  line-height: 1.5;
  color: rgb(75 85 99);
}

.dark .tool-card-desc { color: rgb(161 161 170); }

.tool-card-tag {
  display: inline-block;
  margin-top: .5rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgb(107 114 128);
}

.tool-card-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---------- Premium Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid rgb(229 231 235);
  background: rgb(249 250 251);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.dark .site-footer {
  border-top-color: rgb(39 39 42);
  background: rgb(9 9 11);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

.footer-brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.footer-brand-desc {
  color: rgb(75 85 99);
  font-size: .9375rem;
  line-height: 1.6;
  max-width: 28rem;
  margin-bottom: 1.25rem;
}

.dark .footer-brand-desc { color: rgb(161 161 170); }

.footer-col-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
  color: rgb(17 24 39);
}

.dark .footer-col-title { color: rgb(244 244 245); }

.footer-col-list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.footer-col-list a {
  font-size: .9375rem;
  color: rgb(75 85 99);
  transition: color .3s var(--ease-out), transform .3s var(--ease-out);
  display: inline-block;
}

.dark .footer-col-list a { color: rgb(161 161 170); }

.footer-col-list a:hover {
  color: var(--accent-2);
  transform: translateX(3px);
}

.footer-social {
  display: flex;
  gap: .75rem;
}

.footer-social-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  transition:
    border-color .3s var(--ease-out),
    background-color .3s var(--ease-out),
    transform .3s var(--ease-out),
    color .3s var(--ease-out);
  color: rgb(75 85 99);
}

.dark .footer-social-icon {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
  color: rgb(161 161 170);
}

.footer-social-icon:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.footer-social-icon svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(229 231 235);
  font-size: .8125rem;
  color: rgb(107 114 128);
}

.dark .footer-bottom {
  border-top-color: rgb(39 39 42);
  color: rgb(113 113 122);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

/* ---------- Mobile navigation ---------- */
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgb(229 231 235);
  background: transparent;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}

.dark .mobile-nav-toggle {
  border-color: rgb(39 39 42);
}

.mobile-nav-toggle:hover {
  border-color: var(--accent-2);
}

.mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem;
  margin-top: .5rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 16px;
  background: #fff;
}

.dark .mobile-menu {
  border-color: rgb(39 39 42);
  background: rgb(9 9 11);
}

.mobile-menu.is-open {
  display: flex;
  animation: menu-in .25s var(--ease-out) both;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu a {
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 500;
  transition: background-color .2s var(--ease-out);
}

.mobile-menu a:hover {
  background: rgb(243 244 246);
}

.dark .mobile-menu a:hover {
  background: rgb(24 24 27);
}

/* ---------- Pomodoro Timer ---------- */
.timer-ring-track {
  stroke: rgb(229 231 235);
}

.dark .timer-ring-track {
  stroke: rgb(39 39 42);
}

.timer-ring-progress {
  stroke: url(#timer-gradient);
  stroke-linecap: round;
  transition: stroke-dashoffset .3s linear;
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, .55));
}

.timer-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.mode-tab {
  padding: .625rem 1.25rem;
  border-radius: 9999px;
  font-size: .875rem;
  font-weight: 600;
  transition:
    background-color .3s var(--ease-out),
    color .3s var(--ease-out),
    transform .2s var(--ease-out);
  border: 1px solid transparent;
  color: rgb(107 114 128);
}

.dark .mode-tab { color: rgb(161 161 170); }

.mode-tab:hover {
  color: rgb(17 24 39);
}

.dark .mode-tab:hover { color: rgb(244 244 245); }

.mode-tab.is-active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  color: #fff;
  box-shadow: var(--glow-light);
}

.dark .mode-tab.is-active { box-shadow: var(--glow-dark); }

.timer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  padding: .875rem 2rem;
  border-radius: 16px;
  transition:
    transform .3s var(--ease-out),
    box-shadow .3s var(--ease-out),
    background-color .3s var(--ease-out),
    border-color .3s var(--ease-out);
  border: 1px solid transparent;
}

.timer-btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  color: #fff;
}

.timer-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-light);
}

.dark .timer-btn-primary:hover { box-shadow: var(--glow-dark); }

.timer-btn-ghost {
  border-color: rgb(229 231 235);
  background: transparent;
}

.dark .timer-btn-ghost { border-color: rgb(39 39 42); }

.timer-btn-ghost:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.timer-stat {
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  text-align: center;
}

.dark .timer-stat {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}

.timer-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.timer-stat-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgb(107 114 128);
  margin-top: .25rem;
}

.dark .timer-stat-label { color: rgb(161 161 170); }

/* Subtle pulse while the timer is running */
.timer-running .timer-ring-progress {
  animation: timer-pulse 2.4s var(--ease-smooth) infinite;
}

@keyframes timer-pulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(139, 92, 246, .55)); }
  50%      { filter: drop-shadow(0 0 22px rgba(139, 92, 246, .85)); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-running .timer-ring-progress { animation: none; }
  .article-card-thumb > span { transition: none; }
}



/* =========================================================
   Tools Hub — additive styles
   ========================================================= */

/* Icon gradient variants for tool cards */
.tool-icon-indigo  { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.tool-icon-violet  { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.tool-icon-fuchsia { background: linear-gradient(135deg, #d946ef, #ec4899); }
.tool-icon-cyan    { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.tool-icon-emerald { background: linear-gradient(135deg, #10b981, #06b6d4); }
.tool-icon-amber   { background: linear-gradient(135deg, #f59e0b, #ef4444); }

/* Status badge (Live / Coming soon) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .625rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  display: inline-block;
}

.status-live {
  background: rgba(16, 185, 129, .1);
  color: rgb(4 120 87);
  border-color: rgba(16, 185, 129, .25);
}
.dark .status-live {
  background: rgba(16, 185, 129, .15);
  color: rgb(52 211 153);
  border-color: rgba(16, 185, 129, .35);
}
.status-live .status-dot {
  background: rgb(16 185 129);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
  animation: live-pulse 1.8s var(--ease-smooth) infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); }
  50%      { box-shadow: 0 0 0 5px rgba(16, 185, 129, .08); }
}

.status-soon {
  background: rgba(113, 113, 122, .08);
  color: rgb(82 82 91);
  border-color: rgba(113, 113, 122, .2);
}
.dark .status-soon {
  background: rgba(113, 113, 122, .15);
  color: rgb(161 161 170);
  border-color: rgba(113, 113, 122, .3);
}
.status-soon .status-dot {
  background: rgb(161 161 170);
}

@media (prefers-reduced-motion: reduce) {
  .status-live .status-dot { animation: none; }
}

/* Featured tool showcase (2-column premium card) */
.featured-tool {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  transition:
    transform .4s var(--ease-out),
    border-color .4s var(--ease-out),
    box-shadow .4s var(--ease-out);
}

.dark .featured-tool {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}

.featured-tool:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, .4);
  box-shadow: var(--glow-light);
}

.dark .featured-tool:hover { box-shadow: var(--glow-dark); }

@media (min-width: 900px) {
  .featured-tool {
    grid-template-columns: 1.05fr 1fr;
  }
}

/* Left visual pane — decorative gradient + animated ring */
.featured-tool-visual {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #4338ca 0%, #8b5cf6 50%, #d946ef 100%);
  color: #fff;
}

.featured-tool-visual::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(217, 70, 239, .5), transparent 50%);
  filter: blur(30px);
}

.featured-tool-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.featured-tool-ring {
  width: 220px;
  height: 220px;
  animation: ring-rotate 18s linear infinite;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, .35));
}

.featured-tool-time {
  position: absolute;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  font-size: 2.75rem;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}

@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .featured-tool-ring { animation: none; }
}

/* Right content pane */
.featured-tool-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 900px) {
  .featured-tool-body { padding: 2.75rem; gap: 1.25rem; }
}

.featured-tool-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}

@media (min-width: 900px) {
  .featured-tool-title { font-size: 2.25rem; }
}

.featured-tool-desc {
  color: rgb(75 85 99);
  line-height: 1.65;
}

.dark .featured-tool-desc { color: rgb(161 161 170); }

/* Feature list */
.featured-tool-bullets {
  display: grid;
  grid-template-columns: 1fr;
  gap: .625rem;
  margin: .25rem 0;
}

@media (min-width: 480px) {
  .featured-tool-bullets { grid-template-columns: 1fr 1fr; }
}

.featured-tool-bullets li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  color: rgb(55 65 81);
}

.dark .featured-tool-bullets li { color: rgb(212 212 216); }

.featured-tool-bullets svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent-2);
}

.featured-tool-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}

/* Tool-hub-specific card (extends .tool-card vertically) */
.tool-card-v {
  flex-direction: column;
  gap: 1rem;
}

.tool-card-v .tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.tool-card-v-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

/* CTA strip at bottom of tools hub */
.cta-strip {
  position: relative;
  border-radius: 28px;
  padding: 2.5rem;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #3b0764 100%);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, .3);
}

.cta-strip::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, .35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(217, 70, 239, .35), transparent 45%);
  filter: blur(40px);
}

@media (min-width: 768px) {
  .cta-strip { padding: 3rem 3.5rem; }
}

/* Mark the active nav link */
.nav-link.is-active {
  color: var(--accent-2);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}



/* =========================================================
   GPA Calculator + Article enhancements
   ========================================================= */

/* ---------- GPA Calculator ---------- */
.gpa-card {
  position: relative;
  border-radius: 28px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  padding: 1.5rem;
  transition: border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.dark .gpa-card {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}
@media (min-width: 768px) {
  .gpa-card { padding: 2.25rem; }
}

/* Scale selector chips */
.scale-chip {
  padding: .5rem 1rem;
  border-radius: 9999px;
  font-size: .8125rem;
  font-weight: 600;
  color: rgb(107 114 128);
  border: 1px solid transparent;
  transition:
    background-color .3s var(--ease-out),
    color .3s var(--ease-out),
    border-color .3s var(--ease-out);
}
.dark .scale-chip { color: rgb(161 161 170); }
.scale-chip:hover { color: rgb(17 24 39); }
.dark .scale-chip:hover { color: rgb(244 244 245); }
.scale-chip.is-active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  color: #fff;
  box-shadow: var(--glow-light);
}
.dark .scale-chip.is-active { box-shadow: var(--glow-dark); }

/* GPA input row */
.gpa-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgb(249 250 251);
  border: 1px solid rgb(229 231 235);
  overflow: hidden;
  transition:
    background-color .3s var(--ease-out),
    border-color .3s var(--ease-out),
    max-height .35s var(--ease-out),
    opacity .35s var(--ease-out),
    padding .35s var(--ease-out),
    margin .35s var(--ease-out);
  will-change: max-height, opacity;
}
.dark .gpa-row {
  background: rgb(9 9 11);
  border-color: rgb(39 39 42);
}
@media (min-width: 640px) {
  .gpa-row {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
  }
}

/* Row enter/exit animation */
.gpa-row.is-entering {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-width: 0;
}
.gpa-row.is-leaving {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
}

.gpa-input, .gpa-select {
  width: 100%;
  padding: .625rem .875rem;
  font-size: .9375rem;
  border-radius: 12px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  color: rgb(17 24 39);
  transition:
    border-color .3s var(--ease-out),
    box-shadow .3s var(--ease-out);
  outline: none;
}
.dark .gpa-input, .dark .gpa-select {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
  color: rgb(244 244 245);
}
.gpa-input:focus, .gpa-select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}
.gpa-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

.gpa-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgb(229 231 235);
  background: transparent;
  color: rgb(107 114 128);
  transition:
    color .25s var(--ease-out),
    border-color .25s var(--ease-out),
    background-color .25s var(--ease-out),
    transform .25s var(--ease-out);
  align-self: end;
  justify-self: end;
}
.dark .gpa-remove-btn { border-color: rgb(39 39 42); color: rgb(161 161 170); }
.gpa-remove-btn:hover {
  color: rgb(239 68 68);
  border-color: rgba(239, 68, 68, .5);
  transform: translateY(-1px);
}
.gpa-remove-btn svg { width: 16px; height: 16px; }

/* Result card */
.gpa-result {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  padding: 2rem 1.75rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #3b0764 50%, #831843 100%);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, .35);
}
.gpa-result::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, .45), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(217, 70, 239, .45), transparent 45%);
  filter: blur(40px);
}
.gpa-result-value {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: transform .35s var(--ease-out);
}
@media (min-width: 768px) {
  .gpa-result-value { font-size: 4rem; }
}
.gpa-result-value.is-updating { transform: scale(1.06); }

.gpa-result-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .7);
}

.gpa-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .75rem;
  font-weight: 600;
}

/* ---------- Article reading progress bar ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.read-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  transition: width .12s linear;
  box-shadow: 0 0 8px rgba(139, 92, 246, .6);
}
@media (prefers-reduced-motion: reduce) {
  .read-progress-bar { transition: none; }
}

/* ---------- Article share bar ---------- */
.share-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgb(229 231 235);
  background: rgb(249 250 251);
}
.dark .share-bar {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}
.share-bar-label {
  font-size: .8125rem;
  font-weight: 600;
  color: rgb(107 114 128);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: auto;
}
.dark .share-bar-label { color: rgb(161 161 170); }

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  color: rgb(75 85 99);
  transition:
    color .25s var(--ease-out),
    border-color .25s var(--ease-out),
    transform .25s var(--ease-out),
    background-color .25s var(--ease-out);
}
.dark .share-btn {
  background: rgb(9 9 11);
  border-color: rgb(39 39 42);
  color: rgb(161 161 170);
}
.share-btn:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-2px);
}
.share-btn svg { width: 18px; height: 18px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 10px);
  background: rgb(17 24 39);
  color: #fff;
  padding: .625rem 1rem;
  border-radius: 12px;
  font-size: .875rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  z-index: 70;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}



/* =========================================================
   Article typography & experience enhancements
   ========================================================= */

/* ---------- Article prose typography ---------- */
.article-prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgb(229 231 235);
}
.dark .article-prose h2 {
  border-bottom-color: rgb(39 39 42);
}
.article-prose h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: .75rem;
}
.article-prose p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgb(55 65 81);
  margin-bottom: 1.5rem;
}
.dark .article-prose p {
  color: rgb(212 212 216);
}
.article-prose ul, .article-prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.article-prose li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgb(55 65 81);
  margin-bottom: .5rem;
}
.dark .article-prose li {
  color: rgb(212 212 216);
}
.article-prose a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .25s var(--ease-out);
}
.article-prose a:hover {
  color: var(--accent-1);
}
.article-prose blockquote {
  border-left: 3px solid var(--accent-2);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  background: rgba(139, 92, 246, .05);
  font-style: italic;
  color: rgb(75 85 99);
}
.dark .article-prose blockquote {
  background: rgba(139, 92, 246, .1);
  color: rgb(161 161 170);
}
.article-prose strong {
  font-weight: 700;
  color: rgb(17 24 39);
}
.dark .article-prose strong {
  color: rgb(244 244 245);
}

/* ---------- Article meta badge ---------- */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: .8125rem;
  color: rgb(107 114 128);
}
.dark .article-meta-bar {
  color: rgb(161 161 170);
}
.article-meta-bar .meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}

/* ---------- Related articles grid ---------- */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

.related-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgb(229 231 235);
  background: #fff;
  transition:
    transform .3s var(--ease-out),
    border-color .3s var(--ease-out),
    box-shadow .3s var(--ease-out);
}
.dark .related-card {
  background: rgb(24 24 27);
  border-color: rgb(39 39 42);
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, .4);
  box-shadow: var(--glow-light);
}
.dark .related-card:hover { box-shadow: var(--glow-dark); }

.related-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.related-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
}

.related-card-title {
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .25rem;
}

.related-card-desc {
  font-size: .8125rem;
  line-height: 1.5;
  color: rgb(107 114 128);
}
.dark .related-card-desc { color: rgb(161 161 170); }



/* =========================================================
   Homepage & Design System enhancements (Phase 7-8)
   ========================================================= */

/* ---------- Section transitions ---------- */
section + section {
  position: relative;
}

/* Subtle fade between sections */
.bg-gray-50 + section,
.dark .bg-zinc-950 + section {
  border-top: none;
}

/* ---------- Enhanced hero badge ---------- */
.hero-badge {
  background: rgba(255, 255, 255, .02);
  backdrop-filter: blur(4px);
}
.dark .hero-badge {
  background: rgba(255, 255, 255, .04);
}

/* ---------- Card hover glow effect ---------- */
.tool-card-link:hover .tool-icon,
.tool-card-v:hover .tool-icon {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(139, 92, 246, .4);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.tool-icon {
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

/* ---------- Improved CTA buttons ---------- */
.btn-primary {
  font-weight: 600;
  letter-spacing: -.01em;
}

/* ---------- Footer trust indicator ---------- */
.footer-trust {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  font-size: .8125rem;
  color: rgb(107 114 128);
}
.dark .footer-trust { color: rgb(161 161 170); }
.footer-trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(16 185 129);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
}

/* ---------- Article card clickable area refinement ---------- */
.article-card {
  cursor: pointer;
}

/* ---------- Subtle section separators ---------- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .2), transparent);
  margin: 0 auto;
  max-width: 200px;
}
