/*
Theme Name: Rahul Digital
Theme URI: https://rahuldigital.com
Author: Rahul Remanan
Author URI: https://rahuldigital.com
Description: A premium Digital Marketing Specialist portfolio theme with solar system background animation, dark/light mode, animated skill bars, portfolio, testimonials, and full WordPress Customizer support. All content is editable from the WordPress dashboard without touching code.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rahul-digital
Tags: portfolio, one-page, dark, animation, customizer, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, responsive-layout, rtl-language-support, translation-ready, blog, e-commerce
*/

/* =========================================================
   THEME VARIABLES — Dark Mode (default)
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #040812;
  --surface: rgba(12, 17, 34, 0.88);
  --surface-strong: rgba(15, 24, 50, 0.98);
  --surface-soft: rgba(12, 17, 34, 0.7);
  --text: #f5f7ff;
  --muted: #a5b0d3;
  --primary: #7c3aed;
  --primary-strong: #4f46e5;
  --accent: #2dd4bf;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.4);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
}

body.light {
  color-scheme: light;
  --bg: #f5f7ff;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(245, 247, 255, 0.7);
  --text: #091124;
  --muted: #4b5563;
  --primary: #6366f1;
  --primary-strong: #6d28d9;
  --accent: #0f766e;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, rgba(124,58,237,.18), transparent 25%),
              radial-gradient(circle at bottom right, rgba(56,189,248,.14), transparent 20%),
              var(--bg);
  color: var(--text);
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); margin-top: 0; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section { padding: 5rem 0; }

/* =========================================================
   SOLAR SYSTEM CANVAS
   ========================================================= */
#solarSystemCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

main { position: relative; z-index: 1; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px);
  background: rgba(4, 8, 18, 0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.35s ease;
}

body.light .site-header {
  background: rgba(245,247,255,0.85);
  border-bottom-color: rgba(15,23,42,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.accent { color: var(--primary); }

/* Primary nav */
.primary-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.primary-nav a { color: var(--muted); transition: color 0.25s ease; font-weight: 500; }
.primary-nav a:hover { color: var(--text); }

.controls { display: flex; align-items: center; }

.theme-toggle {
  border: none;
  background: var(--surface-soft);
  color: var(--text);
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}
.theme-toggle:hover { transform: translateY(-2px); }
.icon-sun { display: none; }
body.light .icon-moon { display: none; }
body.light .icon-sun { display: inline; }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero { position: relative; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  align-items: center;
  gap: 2rem;
  min-height: calc(100vh - 100px);
  padding: 2rem 0;
}

.eyebrow {
  display: inline-flex;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(124,58,237,0.14);
  color: var(--primary);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.8rem);
  margin: 0;
  line-height: 0.95;
}

.hero-copy {
  margin: 1.5rem 0 2rem;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

.typing-text { color: var(--text); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 18px 50px rgba(124,58,237,0.18);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
}
body.light .btn-secondary { border-color: rgba(15,23,42,0.15); }

/* =========================================================
   GLASS CARD
   ========================================================= */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  padding: 2rem;
}

/* Hero Panel */
.panel-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.panel-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.panel-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.snapshot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.snapshot-list li { font-size: 0.98rem; line-height: 1.7; color: var(--text); }

/* =========================================================
   SECTION LABELS & HEADINGS
   ========================================================= */
.section-header, .section-intro { max-width: 720px; margin-bottom: 2rem; }
.section-label {
  display: inline-flex;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.section-header h2, .section-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.1;
}
.section-intro p, .section-header p { margin-top: 1rem; color: var(--muted); line-height: 1.8; }

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.section-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.about-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.about-card h3 { margin-top: 0; font-size: 1.25rem; }
.about-card p, .skill-list { color: var(--muted); }
.skill-list { margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; list-style: none; }
.skill-list li {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
body.light .skill-list li {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}

/* =========================================================
   SERVICES SECTION
   ========================================================= */
.services-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.service-card h3 { margin-top: 0; }
.service-card p { color: var(--muted); line-height: 1.8; }

/* =========================================================
   PORTFOLIO SECTION
   ========================================================= */
.portfolio-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.project-card { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.project-card img { height: 240px; object-fit: cover; border-radius: 24px; }
.project-content { padding-top: 1.4rem; }
.project-meta, .project-result { color: var(--primary); font-weight: 600; margin: 0.4rem 0; }
.project-content p { color: var(--muted); line-height: 1.7; }
.project-content h3 { margin-bottom: 0.4rem; }

/* =========================================================
   SKILLS SECTION
   ========================================================= */
.skills-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.skill-card h3 { margin: 0 0 1rem; }
.skill-bar {
  width: 100%; height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
body.light .skill-bar { background: rgba(15,23,42,0.1); }
.skill-progress {
  display: block;
  width: 0; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.4s ease;
}

/* =========================================================
   TESTIMONIALS SECTION
   ========================================================= */
.testimonial-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.testimonial-card p { margin: 0 0 1.4rem; color: var(--muted); line-height: 1.9; }
.testimonial-meta span { display: block; font-weight: 700; color: var(--text); }
.testimonial-meta small { color: var(--muted); }

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1.1fr 1fr; align-items: start; }
.contact-panel h2 { margin: 1rem 0 1.5rem; }
.contact-details { display: grid; gap: 1rem; }
.contact-details div { display: grid; gap: 0.35rem; }
.contact-details strong { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.contact-details a { color: var(--text); }

.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-links a {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}
.social-links a:hover { background: var(--primary); transform: translateY(-2px); }
body.light .social-links a { background: rgba(15,23,42,0.06); }

.contact-form { display: grid; gap: 1rem; }
.contact-form label { font-weight: 600; color: var(--text); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
body.light .contact-form input,
body.light .contact-form textarea {
  border-color: rgba(15,23,42,0.1);
  background: rgba(15,23,42,0.04);
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.14);
}
.wpcf7-response-output { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.9rem; }

/* =========================================================
   BLOG SECTION
   ========================================================= */
.blog-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.blog-card { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.blog-card img { height: 220px; object-fit: cover; border-radius: 24px; }
.blog-card-content { padding-top: 1.2rem; }
.blog-meta { display: flex; gap: 1rem; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.blog-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.blog-card h3 a { color: var(--text); transition: color 0.25s ease; }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { color: var(--muted); line-height: 1.7; margin: 0 0 1rem; }
.read-more { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

/* Single Post */
.single-post-wrap { max-width: 860px; margin: 4rem auto; padding: 0 1rem; }
.single-post-wrap h1 { font-size: clamp(2rem, 3vw, 3rem); margin-bottom: 1rem; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.post-featured-img { border-radius: 24px; overflow: hidden; margin-bottom: 2rem; }
.post-content { color: var(--muted); line-height: 1.9; }
.post-content h2, .post-content h3 { color: var(--text); }
.post-content a { color: var(--primary); }
.post-content img { border-radius: 16px; margin: 2rem 0; }

/* Archive */
.archive-header { margin-bottom: 3rem; }
.pagination { display: flex; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.25s ease;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  padding: 2rem 0 3rem;
  background: linear-gradient(180deg, rgba(4,8,18,0.9), var(--bg));
  position: relative;
  z-index: 1;
}
body.light .site-footer { background: linear-gradient(180deg, rgba(245,247,255,0.9), var(--bg)); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); transition: color 0.25s ease; }
.footer-links a:hover { color: var(--text); }
footer p { margin: 0; }
.copyright { color: var(--muted); font-size: 0.85rem; }

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 48px; height: 48px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.25s ease;
  z-index: 40;
  font-size: 1.2rem;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(-8px); }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.animate-up {
  opacity: 0;
  transform: translateY(40px);
  animation: floatIn 1s ease forwards 0.3s;
}
@keyframes floatIn {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   GUTENBERG EDITOR STYLES
   ========================================================= */
.wp-block-image img { border-radius: 16px; }
.wp-block-quote { border-left: 4px solid var(--primary); padding-left: 1.5rem; color: var(--muted); }

/* =========================================================
   NOTICE / ALERT
   ========================================================= */
.success-msg {
  background: rgba(45,212,191,0.12);
  border: 1px solid rgba(45,212,191,0.3);
  color: var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-top: 1rem;
  font-weight: 600;
}
.error-msg {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-top: 1rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1rem; }
}
@media (max-width: 760px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .primary-nav ul { justify-content: center; }
  .services-grid, .portfolio-grid, .skills-grid, .testimonial-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .hero h1 { font-size: 3.2rem; }
  .hero-actions { flex-direction: column; }
  .contact-form input, .contact-form textarea { padding: 0.9rem 1rem; }
}
