/*
Theme Name: NovaTheme 7
Theme URI: https://vaibhavbodana.com
Author: Vaibhav Bodana
Author URI: https://vaibhavbodana.com
Description: A dark, cosmic-themed WordPress classic theme with customizable gradient colors, background images, star field animation, and auto-fetching social favicons. All sections fully editable via WordPress Customizer — no plugins required. V7 adds background image uploads, gradient customization, star animation, and fixed blog image fallback.
Version: 7.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novatheme7
Tags: dark, one-column, custom-colors, custom-logo, featured-images, blog
*/

/* ===== RESET & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Recursive:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --nt-bg: #121520;
  --nt-card: #1a1e2e;
  --nt-card-50: rgba(26, 30, 46, 0.5);
  --nt-card-30: rgba(26, 30, 46, 0.3);
  --nt-foreground: #eef0f5;
  --nt-muted: #8b91a5;
  --nt-border: #2a2e3d;
  --nt-primary: #33ffcc;
  --nt-primary-fg: #121520;
  --nt-accent: #5577ee;
  --nt-secondary: #262a3d;
  --nt-radius: 0.75rem;
  --nt-font: 'Recursive', sans-serif;

  /* Gradient colors — overridden by Customizer inline CSS */
  --nt-g1: #33ffcc;
  --nt-g2: #00d4ff;
  --nt-g3: #5577ee;
  --nt-g4: #7755cc;
  --nt-hero-gradient: linear-gradient(135deg, var(--nt-g1) 0%, var(--nt-g2) 33%, var(--nt-g3) 66%, var(--nt-g4) 100%);
  --nt-text-gradient: linear-gradient(90deg, var(--nt-g1) 0%, var(--nt-g2) 33%, var(--nt-g3) 66%, var(--nt-g4) 100%);
  --nt-glow-primary: 0 0 60px rgba(0, 212, 255, 0.2);
  --nt-rainbow-border: linear-gradient(135deg, var(--nt-g1), var(--nt-g2), var(--nt-g3), var(--nt-g4));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--nt-font);
  background: var(--nt-bg);
  color: var(--nt-foreground);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
}

html { background: var(--nt-bg); }

h1, h2, h3, h4, h5, h6 { font-family: var(--nt-font); }

a { text-decoration: none; color: inherit; transition: color 0.3s; }

img { max-width: 100%; height: auto; }

/* ===== STAR FIELD ANIMATION ===== */
.star-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: rgba(238, 240, 245, 0.6);
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ===== LAYOUT WRAPPER ===== */
.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (min-width: 768px) {
  .site-wrapper { padding: 3rem 2rem; }
}

.site-container {
  position: relative;
  width: 100%;
  max-width: 64rem;
  border-radius: 1rem;
  border: 1px solid var(--nt-border);
  background: rgba(26, 30, 46, 0.6);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background-size: cover;
  background-position: center;
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR ===== */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--nt-border);
  background: rgba(26, 30, 46, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-navbar .site-logo {
  font-size: 1.25rem;
  font-weight: 600;
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-navbar .nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

@media (min-width: 768px) {
  .site-navbar .nav-links { display: flex; }
}

.site-navbar .nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nt-muted);
  transition: color 0.3s;
}

.site-navbar .nav-links a:hover { color: var(--nt-foreground); }

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero-section .hero-inner { max-width: 48rem; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--nt-primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--nt-muted);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; }
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--nt-radius);
  background: var(--nt-hero-gradient);
  color: var(--nt-primary-fg);
  font-weight: 500;
  box-shadow: var(--nt-glow-primary);
  transition: opacity 0.3s;
  text-align: center;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--nt-radius);
  border: 1px solid var(--nt-border);
  color: var(--nt-foreground);
  font-weight: 500;
  transition: background 0.3s;
  text-align: center;
}

.btn-outline:hover { background: var(--nt-secondary); }

/* ===== SECTION COMMON ===== */
.nt-section {
  padding: 8rem 1.5rem;
  position: relative;
}

.nt-section .section-label {
  color: var(--nt-primary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: block;
}

.nt-section .section-title {
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .nt-section .section-title { font-size: 3rem; }
}

.section-center { text-align: center; margin-bottom: 4rem; }

/* ===== ABOUT SECTION ===== */
.about-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}

.about-text p { color: var(--nt-muted); line-height: 1.75; margin-bottom: 1rem; }

.about-visual { position: relative; }

.about-card {
  aspect-ratio: 1;
  border-radius: 1rem;
  padding: 2px;
  background: var(--nt-rainbow-border);
}

.about-card-inner {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background: var(--nt-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-card-content { text-align: center; padding: 2rem; }

.about-icon {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(to bottom right, rgba(51, 255, 204, 0.2), rgba(85, 119, 238, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.75rem;
}

.about-stat-number { font-size: 1.875rem; font-weight: 700; color: var(--nt-foreground); }
.about-stat-label { font-size: 0.875rem; color: var(--nt-muted); }

.floating-badge {
  position: absolute;
  background: var(--nt-card);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  padding: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.floating-badge-left { left: -2rem; top: 25%; }
.floating-badge-right { right: -2rem; bottom: 25%; }
.floating-badge .badge-number { font-size: 1.5rem; font-weight: 700; }
.floating-badge .badge-number.primary { color: var(--nt-primary); }
.floating-badge .badge-number.accent { color: var(--nt-accent); }
.floating-badge .badge-label { font-size: 0.75rem; color: var(--nt-muted); }

/* ===== SKILLS SECTION ===== */
.skills-box {
  max-width: 72rem;
  margin: 0 auto;
  background: var(--nt-card-30);
  backdrop-filter: blur(4px);
  border: 1px solid var(--nt-border);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
}

.skills-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (min-width: 768px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.skills-col-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--nt-foreground);
  margin-bottom: 0.75rem;
}

.skills-grid .skill-item {
  color: var(--nt-muted);
  padding: 0.25rem 0;
  transition: color 0.2s;
  cursor: default;
}

.skills-grid .skill-item:hover { color: var(--nt-foreground); }

/* ===== FOCUS / RESEARCH SECTION ===== */
.focus-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

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

.focus-card {
  position: relative;
  background: var(--nt-card-50);
  backdrop-filter: blur(4px);
  border: 1px solid var(--nt-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color 0.3s;
  overflow: hidden;
}

.focus-card:hover { border-color: rgba(0, 212, 255, 0.5); }

.focus-card .card-hover-bg {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, rgba(51, 255, 204, 0.05), rgba(85, 119, 238, 0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.focus-card:hover .card-hover-bg { opacity: 1; }

.focus-card .card-content { position: relative; z-index: 1; }
.focus-card .card-icon { font-size: 2.25rem; margin-bottom: 1rem; display: block; }
.focus-card h3 { font-size: 1.25rem; font-weight: 600; color: var(--nt-foreground); margin-bottom: 0.75rem; }
.focus-card p { color: var(--nt-muted); line-height: 1.75; }

/* ===== BLOG / ARTICLES SECTION ===== */
.blog-list {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  display: flex;
  gap: 1.25rem;
  background: var(--nt-card-30);
  backdrop-filter: blur(4px);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  padding: 1rem;
  transition: border-color 0.3s, background 0.3s;
}

.blog-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: var(--nt-card-50);
}

.blog-card .card-thumb {
  width: 7rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
  background: var(--nt-secondary);
}

@media (min-width: 768px) {
  .blog-card .card-thumb { width: 9rem; height: 6rem; }
}

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

.blog-card .card-title {
  font-weight: 500;
  color: var(--nt-foreground);
  transition: color 0.3s;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card:hover .card-title { color: var(--nt-primary); }

.blog-card .card-date { font-size: 0.75rem; color: var(--nt-muted); margin-bottom: 0.375rem; }

.blog-card .card-excerpt {
  font-size: 0.875rem;
  color: var(--nt-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

/* Blog placeholder for posts without thumbnails */
.card-thumb-placeholder {
  width: 7rem;
  height: 5rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  background: var(--nt-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nt-muted);
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .card-thumb-placeholder { width: 9rem; height: 6rem; }
}

.view-all-link { text-align: center; margin-top: 2.5rem; }

.view-all-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--nt-primary);
  font-weight: 500;
  transition: opacity 0.3s;
}

.view-all-link a:hover { opacity: 0.8; }

/* ===== SUBSTACK EMBED ===== */
.substack-embed { text-align: center; margin-bottom: 2rem; }
.substack-embed iframe { max-width: 100%; border-radius: 0.75rem; }

/* ===== CONTACT SECTION ===== */
.contact-box {
  max-width: 56rem;
  margin: 0 auto;
  background: var(--nt-card-50);
  backdrop-filter: blur(4px);
  border: 1px solid var(--nt-border);
  border-radius: 1rem;
  padding: 2rem;
}

@media (min-width: 768px) { .contact-box { padding: 3rem; } }

.contact-grid { display: grid; gap: 2rem; }

@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-grid h3 { font-size: 1.25rem; font-weight: 600; color: var(--nt-foreground); margin-bottom: 1rem; }

.contact-info-item { margin-bottom: 1rem; }
.contact-info-item .info-label { font-size: 0.875rem; color: var(--nt-muted); margin-bottom: 0.25rem; }
.contact-info-item .info-value { color: var(--nt-foreground); }
.contact-info-item .info-value .highlight { color: var(--nt-primary); font-weight: 500; }

/* ===== SOCIAL LINKS WITH FAVICONS ===== */
.social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--nt-radius);
  border: 1px solid var(--nt-border);
  font-size: 0.875rem;
  color: var(--nt-foreground);
  transition: border-color 0.3s, color 0.3s;
}

.social-link:hover { border-color: var(--nt-primary); color: var(--nt-primary); }
.social-link .social-favicon { width: 16px; height: 16px; border-radius: 2px; flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--nt-rainbow-border);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

.footer-inner p { font-size: 0.875rem; color: var(--nt-muted); }

/* ===== SINGLE POST ===== */
.single-post-header {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

.single-post-header .post-meta { font-size: 0.875rem; color: var(--nt-muted); margin-bottom: 1rem; }

.single-post-header .post-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) { .single-post-header .post-title { font-size: 3rem; } }

.single-post-thumbnail { max-width: 48rem; margin: 0 auto 2rem; padding: 0 1.5rem; }
.single-post-thumbnail img { width: 100%; border-radius: var(--nt-radius); object-fit: cover; max-height: 400px; }

.single-post-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  color: var(--nt-muted);
  line-height: 1.85;
  font-size: 1.05rem;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 { color: var(--nt-foreground); margin: 2rem 0 1rem; }

.single-post-content h2 { font-size: 1.75rem; }
.single-post-content h3 { font-size: 1.5rem; }
.single-post-content p { margin-bottom: 1.25rem; }
.single-post-content a { color: var(--nt-primary); }
.single-post-content a:hover { opacity: 0.8; }

.single-post-content blockquote {
  border-left: 3px solid var(--nt-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--nt-foreground);
  font-style: italic;
}

.single-post-content ul,
.single-post-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.single-post-content li { margin-bottom: 0.5rem; }
.single-post-content img { border-radius: var(--nt-radius); margin: 1.5rem 0; }

.single-post-content code {
  background: var(--nt-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.single-post-content pre {
  background: var(--nt-secondary);
  padding: 1.25rem;
  border-radius: var(--nt-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.single-post-content pre code { background: none; padding: 0; }

/* ===== ARCHIVE / VIEW ALL ===== */
.archive-header {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

.archive-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--nt-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) { .archive-header h1 { font-size: 3rem; } }

/* ===== PAGINATION ===== */
.nt-pagination {
  max-width: 56rem;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.nt-pagination a,
.nt-pagination span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--nt-radius);
  border: 1px solid var(--nt-border);
  color: var(--nt-foreground);
  font-size: 0.875rem;
  transition: border-color 0.3s, color 0.3s;
}

.nt-pagination a:hover { border-color: var(--nt-primary); color: var(--nt-primary); }

.nt-pagination .current {
  background: var(--nt-primary);
  color: var(--nt-primary-fg);
  border-color: var(--nt-primary);
}

/* ===== WORDPRESS CORE ===== */
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--nt-muted); margin-top: 0.5rem; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }
