/* ============================================================
   రంజితం · Ranjitham — v3 "Modern Writer"
   Clean canvas · violet→rose gradient accent · Anek Telugu
   Dark mode · aurora hero · marquee · scroll reveals
   ============================================================ */
:root {
  --bg:      #FBFBFA;
  --surface: #FFFFFF;
  --ink:     #131318;
  --muted:   #64646F;
  --line:    #E9E9EE;
  --soft:    #F3F3F6;
  --a1:      #7C3AED;   /* violet   */
  --a2:      #F43F5E;   /* rose     */
  --grad:    linear-gradient(100deg, var(--a1), var(--a2));
  --radius:  18px;
  --shadow-sm: 0 1px 3px rgba(18, 18, 24, 0.06), 0 4px 14px rgba(18, 18, 24, 0.05);
  --shadow-lg: 0 8px 20px rgba(18, 18, 24, 0.09), 0 24px 50px rgba(18, 18, 24, 0.12);
  --tel:     'Noto Sans Telugu', 'Space Grotesk', system-ui, sans-serif;
  --serif:   'Noto Serif Telugu', georgia, serif;
  --latin:   'Space Grotesk', system-ui, sans-serif;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="dark"] {
  --bg:      #0E0E12;
  --surface: #17171D;
  --ink:     #F1F1F4;
  --muted:   #9B9BA7;
  --line:    #27272F;
  --soft:    #1D1D24;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.5), 0 24px 50px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--tel);
  font-size: 17px;
  line-height: 1.7;
  transition: background 0.35s ease, color 0.35s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2.5px solid var(--a1); outline-offset: 3px; border-radius: 4px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- progress bar ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--grad);
  z-index: 80;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(18,18,24,0.06); }
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.2rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.brand {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0;
  line-height: 1;
}
.brand-dot { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0 auto; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--ink); background: var(--soft); }
.nav-mobile-search { display: none; }
.nav-actions { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { background: var(--soft); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span {
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================================
   HERO — aurora
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6.2rem 1.2rem 5rem;
  text-align: center;
}
.blob {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
[data-theme="dark"] .blob { opacity: 0.28; }
.blob-a { background: var(--a1); top: -220px; left: -120px; animation: float-a 14s ease-in-out infinite; }
.blob-b { background: var(--a2); bottom: -260px; right: -140px; animation: float-b 17s ease-in-out infinite; }
@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(70px, 50px) scale(1.12); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-80px, -50px) scale(1.08); }
}

.hero-inner { position: relative; max-width: 860px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--latin);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  margin: 0 0 1.6rem;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--a2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: 0;
  margin: 0;
}
.hero-title .line { display: block; }
.hero-title em { font-style: normal; position: relative; white-space: nowrap; }
.hero-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -0.02em;
  height: 0.16em;
  background: var(--grad);
  border-radius: 999px;
  opacity: 0.85;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.9s var(--ease) 0.9s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero-sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  line-height: 1.8;
  margin: 1.5rem auto 2.2rem;
  max-width: 640px;
}
.hero-sub-en { font-family: var(--latin); font-size: 0.88em; opacity: 0.85; }

.hero-cta { display: flex; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }
.btn-grad {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  padding: 0.78rem 1.7rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn-grad:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(124, 58, 237, 0.45); }
.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  padding: 0.78rem 1.7rem;
  border-radius: 999px;
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}
.btn-ghost:hover { border-color: var(--a1); transform: translateY(-3px); }

/* hero load sequence */
.hero-eyebrow, .hero-title .line, .hero-sub, .hero-cta {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.85s var(--ease) forwards;
}
.hero-title .line:nth-child(1) { animation-delay: 0.12s; }
.hero-title .line:nth-child(2) { animation-delay: 0.24s; }
.hero-sub { animation-delay: 0.4s; }
.hero-cta { animation-delay: 0.52s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 0.85rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--muted);
  transition: color 0.25s;
  pointer-events: auto;
}
.marquee-item:hover { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.marquee-sep { color: var(--a2); font-size: 0.8rem; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1120px; margin: 0 auto; padding: 3.2rem 1.2rem 4rem; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.kicker {
  font-family: var(--latin);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a1);
  margin: 0 0 0.5rem;
}
.meta { color: var(--muted); font-size: 0.86rem; margin: 0; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.meta-center { justify-content: center; }
.tag {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.12rem 0.72rem;
  border-radius: 999px;
  transition: border-color 0.25s, color 0.25s;
}
a.tag:hover, .card:hover .tag { border-color: var(--a1); color: var(--a1); }
.excerpt { color: var(--muted); font-size: 0.97rem; line-height: 1.7; margin: 0.5rem 0 0.9rem; }

.read-more {
  font-weight: 600;
  font-size: 0.94rem;
  color: transparent;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.arrow { display: inline-block; transition: transform 0.3s var(--ease); color: var(--a2); }
.card:hover .arrow, .featured:hover .arrow, .related-item:hover .arrow, .result-item:hover .arrow { transform: translateX(6px); }

/* ============================================================
   FEATURED
   ============================================================ */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s;
}
.featured:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--a1) 40%, var(--line)); }
.featured-media { overflow: hidden; min-height: 320px; }
.featured-media img, .card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.featured:hover .featured-media img { transform: scale(1.05); }
.featured-body {
  padding: 2.4rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.4rem;
}
.featured-title {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  margin: 0;
}

.media-fallback {
  width: 100%; height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%),
    radial-gradient(circle at 75% 75%, color-mix(in srgb, var(--a2) 20%, transparent), transparent 70%),
    var(--soft);
}
.media-fallback span {
  font-weight: 800;
  font-size: 3rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   GRID CARDS
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.7rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s;
}
.card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--a1) 40%, var(--line));
}
.card-media { overflow: hidden; aspect-ratio: 16/9; }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; align-items: flex-start; }
.card-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0;
  margin: 0.55rem 0 0;
  transition: color 0.25s;
}
.card:hover .card-title { color: var(--a1); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single { max-width: 740px; margin: 0 auto; }
.single-head { text-align: center; margin: 1rem 0 2.2rem; }
.single-title {
  font-size: clamp(2rem, 6.4vw, 3.3rem);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0;
  margin: 0.9rem 0 1.1rem;
}
.byline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0;
}
.byline-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.single-cover { margin: 0 0 2.4rem; }
.single-cover img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.single-content {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 2.05;
}
.single-content p { margin: 0 0 1.4em; }
.single-content h2, .single-content h3 {
  font-family: var(--tel);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.6;
  margin: 2em 0 0.6em;
}
.single-content h2 { font-size: 1.7rem; }
.single-content h3 { font-size: 1.35rem; }
.single-content blockquote {
  position: relative;
  margin: 2em 0;
  padding: 1.4em 1.6em;
  background: var(--soft);
  border-radius: var(--radius);
  font-style: italic;
}
.single-content blockquote::before {
  content: '';
  position: absolute;
  left: 0; top: 12%;
  height: 76%;
  width: 4px;
  border-radius: 999px;
  background: var(--grad);
}
.single-content img { border-radius: var(--radius); margin: 1.5em auto; }
.single-content a {
  color: var(--a1);
  background-image: linear-gradient(90deg, var(--a1), var(--a2));
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 100%;
  padding-bottom: 1px;
}
.single-content ul, .single-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.single-foot { text-align: center; margin-top: 3rem; }

.related { max-width: 740px; margin: 3rem auto 0; }
.related h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.9rem; }
.related-list { display: flex; flex-direction: column; gap: 0.7rem; }
.related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1.25rem;
  font-weight: 600;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.related-item:hover {
  border-color: color-mix(in srgb, var(--a1) 40%, var(--line));
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   PAGE HEADS / SEARCH / RESULTS / PAGINATION
   ============================================================ */
.page-head { text-align: center; margin: 1rem 0 2.6rem; }
.page-title {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  display: inline-block;
}
.page-sub { color: var(--muted); margin: 0.6rem 0 0; }

.big-search { display: flex; gap: 0.7rem; max-width: 560px; margin: 1.6rem auto 0; }
.big-search input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  font-family: var(--tel);
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.big-search input:focus {
  border-color: var(--a1);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 18%, transparent);
}
.big-search button {
  border: 0;
  background: var(--grad);
  color: #fff;
  font-family: var(--tel);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.big-search button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124,58,237,0.35); }
.result-count { margin-bottom: 1.6rem; }

.result-list { display: flex; flex-direction: column; gap: 0.9rem; max-width: 740px; margin: 0 auto; }
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.result-item:hover { border-color: color-mix(in srgb, var(--a1) 40%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.result-item h3 { margin: 0 0 0.2rem; font-size: 1.15rem; font-weight: 700; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  margin-top: 3rem;
  font-weight: 600;
}
.pagination a {
  padding: 0.5rem 1.3rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: all 0.3s var(--ease);
}
.pagination a:hover { border-color: var(--a1); color: var(--a1); transform: translateY(-2px); }
.pagination span { color: var(--muted); }

.empty-state { text-align: center; color: var(--muted); padding: 4rem 1rem; }
.empty-state h2 { font-weight: 800; color: var(--ink); }
.empty-state a { color: var(--a1); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.2rem 2rem;
  position: relative;
}
.footer-word {
  font-weight: 800;
  font-size: clamp(4.4rem, 16vw, 11rem);
  line-height: 1.25;
  margin: 0 0 1.4rem;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--muted) 42%, transparent);
  user-select: none;
  white-space: nowrap;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.footer-title { font-weight: 700; font-size: 1.2rem; margin: 0 0 0.3rem; }
.footer-desc { color: var(--muted); font-size: 0.94rem; line-height: 1.75; margin: 0; }
.footer-nav { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-nav a { color: var(--muted); font-weight: 500; transition: color 0.25s; }
.footer-nav a:hover { color: var(--a1); }
.footer-copy { color: var(--muted); font-size: 0.82rem; margin: 1.4rem 0 0; font-family: var(--latin); }

.to-top {
  position: fixed;
  right: 1.2rem; bottom: 1.2rem;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(124,58,237,0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 50;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ============================================================
   ADMIN — restyled to match v3
   ============================================================ */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 420px at 15% 0%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 65%),
    radial-gradient(700px 420px at 90% 100%, color-mix(in srgb, var(--a2) 26%, transparent), transparent 65%),
    #0E0E12;
  padding: 1rem;
  font-family: var(--tel);
}
.login-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.4rem 2.2rem;
  width: 100%;
  max-width: 390px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: rise 0.6s var(--ease);
}
.login-mark {
  font-weight: 800;
  font-size: 2.1rem;
  text-align: center;
  margin: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card h1 { text-align: center; font-size: 1.02rem; font-weight: 500; margin: 0.15rem 0 1.5rem; color: var(--muted); }
.login-card label { display: block; margin-bottom: 1rem; font-size: 0.88rem; font-weight: 600; }
.login-card input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.72rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--tel);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.login-card input:focus { border-color: var(--a1); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 16%, transparent); }
.login-back { text-align: center; margin-top: 1.2rem; font-size: 0.85rem; }
.login-back a { color: var(--a1); font-weight: 600; }

.admin-body { background: var(--bg); color: var(--ink); font-family: var(--tel); }
.admin-topbar {
  background: #101016;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  padding: 0.75rem 1.3rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-mark { font-weight: 800; font-size: 1.35rem; color: #fff; }
.admin-mark span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font-size: 0.92rem; flex: 1; }
.admin-nav a { color: #B9B9C6; font-weight: 500; transition: color 0.25s; }
.admin-nav a:hover { color: #fff; }
.admin-nav .logout { margin-left: auto; color: #F19AA6; }
.admin-main { max-width: 1040px; margin: 0 auto; padding: 1.8rem 1.2rem 3rem; }
.admin-head-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.admin-head-row .count { color: var(--muted); font-size: 0.8em; }

.btn {
  display: inline-block;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.5rem 1.15rem;
  font-family: var(--tel);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn:hover { border-color: var(--a1); color: var(--a1); transform: translateY(-1px); }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(124,58,237,0.35); }
.btn-danger { color: var(--a2); border-color: color-mix(in srgb, var(--a2) 35%, var(--line)); }
.btn-danger:hover { background: var(--a2); color: #fff; border-color: var(--a2); }
.btn-small { padding: 0.24rem 0.75rem; font-size: 0.82rem; border-radius: 9px; }
.btn-block { width: 100%; }

.alert { padding: 0.75rem 1.05rem; border-radius: 12px; font-size: 0.92rem; animation: rise 0.4s var(--ease); }
.alert-error { background: #FDECEE; color: #9C1B2E; border: 1px solid #F5C2CB; }
.alert-ok    { background: #E8F7EC; color: #14603A; border: 1px solid #BFE6CC; }
[data-theme="dark"] .alert-error { background: #3A1218; color: #F5A9B4; border-color: #64202C; }
[data-theme="dark"] .alert-ok    { background: #10291B; color: #93D8AC; border-color: #1F4A31; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 640px; }
.admin-table th, .admin-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--soft); font-weight: 700; }
.admin-table tbody tr { transition: background 0.2s; }
.admin-table tbody tr:hover { background: var(--soft); }
.admin-table .t-title a { font-weight: 600; }
.admin-table .t-title a:hover { color: var(--a1); }
.t-actions { white-space: nowrap; }
.badge { padding: 0.12rem 0.62rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.badge-published { background: #E8F7EC; color: #14603A; }
.badge-draft { background: #FBF3DC; color: #8A6A12; }
[data-theme="dark"] .badge-published { background: #10291B; color: #93D8AC; }
[data-theme="dark"] .badge-draft { background: #2E2712; color: #E3C96E; }

.post-form label, .cat-form input { display: block; margin-bottom: 1rem; font-weight: 600; font-size: 0.9rem; }
.post-form input[type=text], .post-form input[type=url],
.post-form select, .post-form textarea, .cat-form input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: var(--tel);
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.post-form input:focus, .post-form select:focus, .post-form textarea:focus, .cat-form input:focus {
  border-color: var(--a1);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 14%, transparent);
}
.input-title { font-size: 1.25rem !important; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1.2rem; }
.cover-box { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.2rem; background: var(--surface); }
.cover-box legend { font-weight: 700; font-size: 0.88rem; padding: 0 0.4rem; }
.current-cover img { max-width: 220px; border-radius: 12px; margin-bottom: 0.4rem; }
.inline { display: inline-flex !important; align-items: center; gap: 0.4rem; font-weight: 400 !important; }
.form-actions { display: flex; gap: 0.8rem; margin-top: 1.4rem; }
.cat-form { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 0.8rem; align-items: start; margin: 1.2rem 0 1.6rem; }
.cat-form input { margin: 0; }

#editor { background: var(--surface); min-height: 340px; font-family: var(--serif); font-size: 1.08rem; }
.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: var(--line); background: var(--surface); position: sticky; top: 58px; z-index: 5; }
.ql-container.ql-snow { border-radius: 0 0 12px 12px; border-color: var(--line); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 800px) {
  body { font-size: 16px; }
  .hero { padding: 4.4rem 1.2rem 3.6rem; }
  .blob { width: 340px; height: 340px; filter: blur(70px); }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(18,18,24,0.16);
    padding: 0.7rem 1.2rem 1.1rem;
  }
  .nav-links.open { display: flex; animation: navDrop 0.35s var(--ease); }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
  }
  .nav-links a { display: block; padding: 0.65rem 0.6rem; border-radius: 10px; }
  .nav-mobile-search { display: block; margin-top: 0.5rem; }
  .nav-mobile-search input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--tel);
    font-size: 0.96rem;
  }

  .featured { grid-template-columns: 1fr; }
  .featured-media { min-height: 210px; }
  .featured-body { padding: 1.5rem 1.4rem 1.7rem; }
  .single-content { font-size: 1.08rem; line-height: 1.95; }
  .footer-grid { flex-direction: column; }
  .cat-form { grid-template-columns: 1fr; }
  .admin-nav .logout { margin-left: 0; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { text-align: center; }
  .result-item { flex-direction: row; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .hero-eyebrow, .hero-title .line, .hero-sub, .hero-cta { opacity: 1; transform: none; }
}
