/* 
 * MODERN PREMIUM DARK DESIGN 
 * Vanilla CSS Custom Framework
 */

:root {
  /* Dynamic Neon / Cyber Palette */
  --bg-base: #050505;
  --bg-surface: rgba(20, 20, 20, 0.6);
  --bg-glass: rgba(30, 30, 32, 0.45);
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  
  --accent-primary: #8b5cf6; /* Vivid Purple */
  --accent-secondary: #06b6d4; /* Neon Cyan */
  --accent-glow: rgba(139, 92, 246, 0.5);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  /* Utilities */
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.7);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  --accent-primary: #6d28d9; 
  --accent-secondary: #0284c7; 
  --accent-glow: rgba(109, 40, 217, 0.2);
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
}

/* Base Reset & Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6, .brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

/* Background Effects */
.bg-glow {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(100px);
  z-index: -2;
  opacity: 0.6;
  animation: pulse 8s infinite alternate;
}

.bg-glow-secondary {
  top: auto;
  bottom: -20%;
  left: auto;
  right: -10%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 60%);
  animation: pulse 12s infinite alternate-reverse;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.2); opacity: 0.7; }
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Navbar */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  position: sticky;
  top: 1rem;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
}
.btn-theme-toggle:hover {
  background: rgba(120, 120, 120, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(120, 120, 120, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(120, 120, 120, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-primary) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, #0f172a 20%, var(--accent-primary) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-alt {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1rem 3rem;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-supertext {
  color: var(--accent-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(6, 182, 212, 0.05);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

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

/* 2-Column Layout for Sections */
.split-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

/* Cards & Glass Panels */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
}

[data-theme="light"] .post-card {
  background: rgba(255, 255, 255, 0.85);
}

.post-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .post-card:hover {
  background: #ffffff;
}

.post-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.post-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-base), transparent);
  opacity: 0.8;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.post-card:hover .post-img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-tag {
  font-size: 0.75rem;
  color: var(--accent-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.post-title a {
  background-image: linear-gradient(transparent calc(100% - 2px), var(--accent-primary) 2px);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.3s;
}

.post-card:hover .post-title a {
  background-size: 100% 100%;
}

.post-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Body */
.article-header {
  margin-bottom: 3rem;
  text-align: center;
}

.article-hero {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
  border: 1px solid var(--border-subtle);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.article-body h3 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body code {
  background: var(--bg-surface);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
  font-family: monospace;
}

.article-body pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin-left: 0;
  font-style: italic;
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Sidebar & About */
.sidebar-sticky {
  position: sticky;
  top: 6rem;
}

.author-profiler {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.author-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  padding: 2px;
  object-fit: cover;
}

[data-theme="light"] .author-img {
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.feature-list {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '→';
  color: var(--accent-secondary);
  font-weight: bold;
}

.status-card {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 2rem;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-secondary);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.section-head {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.value-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

[data-theme="light"] .value-card {
  background: rgba(255, 255, 255, 0.85);
}

.value-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Responsive Navbar Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    display: none; /* In a real app we'd toggle a mobile menu class */
  }
  
  .app-container {
    padding: 1rem;
  }
}
