/* CSS Variables for theming */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a1f2e;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --accent-primary: #10b981;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --accent-primary: #059669;
  --accent-secondary: #2563eb;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* Header & Navigation - MODERN */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0;
  transition: all 0.3s ease;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.95);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
    letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.site-logo:hover {
  color: var(--accent-primary);
}
.nav-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  align-items: center;
}

.nav-menu li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: block;
}

.nav-menu li a:hover {
  color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.nav-menu li a.active {
  color: var(--accent-primary);
  background: var(--bg-tertiary);
}

/* Modern Theme Toggle Button */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(20deg) scale(1.1);
}

/* Hide/show icons based on theme */
.theme-icon-sun {
  display: none;
}

.theme-icon-moon {
  display: block;
}

[data-theme="light"] .theme-icon-sun {
  display: block;
}

[data-theme="light"] .theme-icon-moon {
  display: none;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.hero-section .container {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

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

.btn {
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

/* Floating Card */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
  min-width: 300px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.card-icon {
  font-size: 1.5rem;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Sections */
section {
  padding: 6rem 0;
}

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

.section-tag {
  display: inline-block;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
}

/* About Section */
.about-section {
  background: var(--bg-secondary);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Skills Section */
.skills-section {
  position: relative;
}

.skills-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.skill-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent-primary);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.skill-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.skill-tags span:hover {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

/* Certifications Section */
.certifications-section {
  background: var(--bg-secondary);
  position: relative;
}

.certifications-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.cert-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent-primary);
}

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

.cert-badge {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.cert-card:hover .cert-badge {
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.cert-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cert-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--accent-primary);
  font-weight: 700;
}

.cert-card:hover .cert-arrow {
  opacity: 1;
  transform: translateX(0);
}

.cert-issuer {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.cert-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.cert-status {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.completed-badge {
  background: var(--accent-primary);
  color: white;
}

.progress-badge {
  background: var(--accent-secondary);
  color: white;
}

.planned-badge {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.training-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
}

/* Projects Section */
.projects-section {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent-primary);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  background: var(--bg-secondary); /* Adds nice background */
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(16, 185, 129, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-project {
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
}

.project-content {
  padding: 2rem;
}

.featured-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-primary);
  color: white;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-title a:hover {
  color: var(--accent-primary);
}

.project-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.project-meta span {
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-secondary);
}

.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

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

/* Contact Section */
.contact-section {
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin: 2rem 0;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent-primary);
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.contact-link > div {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.link-icon {
  font-size: 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* Blog/Post Styles */
.blog-section,
.author-archive,
.tag-archive {
  padding: 8rem 0 4rem;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent-primary);
}

.post-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

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

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

.post-content {
  padding: 2rem;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.post-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--accent-primary);
}

.post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
}

.post-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Single Post/Page */
.post-single,
.page-single {
  padding: 8rem 0 4rem;
}

.post-header,
.page-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.post-feature-image,
.page-feature-image {
  max-width: 1200px;
  margin: 0 auto 3rem;
  border-radius: 1rem;
  overflow: hidden;
}

.post-feature-image img,
.page-feature-image img {
  width: 100%;
  display: block;
}

.post-content,
.page-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content h2,
.post-content h3,
.page-content h2,
.page-content h3 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content a,
.page-content a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.post-content code,
.page-content code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

.post-content pre,
.page-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

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

.post-footer {
  max-width: 800px;
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.author-card {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
}

/* Related Posts */
.related-posts {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

/* Ghost Koenig Editor Classes - REQUIRED */
.kg-width-wide {
  max-width: 1200px;
  margin: 2rem auto;
}

.kg-width-full {
  max-width: 100vw;
  width: 100vw;
  margin: 2rem calc(50% - 50vw);
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-image-card {
  margin: 2rem 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  margin: 2rem 0;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-embed-card {
  margin: 2rem 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  /* Header mobile adjustments */
  .site-header {
    padding: 0;
  }
  
  .site-nav {
    padding: 0.75rem 0;
  }
  
  .site-logo {
    font-size: 1.125rem;
  }
  
  .nav-menu {
    gap: 0.25rem;
  }
  
  .nav-menu li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .theme-toggle {
    width: 38px;
    height: 38px;
    margin-left: 0.5rem;
  }
  
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }
  
  /* Hide some nav items on mobile to save space */
  .nav-menu li:nth-child(n+5) {
    display: none;
  }
  .hero-section .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-visual {
    margin-top: 3rem;
  }

  .nav-menu {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-grid,
  .projects-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ================================================
   MODERN ARTICLE/POST STYLING WITH MOBILE FIXES
   ================================================ */

/* Modern Article Styling */
.post-template {
  padding-top: 5rem;
}

.article-header {
  text-align: center;
  padding: 4rem 0 3rem;
  background: var(--bg-secondary);
  position: relative;
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.article-header .container {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.article-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.article-tag:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
}

.article-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.reading-time {
  color: var(--text-tertiary);
}

.article-image {
  max-width: 1400px;
  text-align: center; /* Added for centering */
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
}

.article-image img {
  width: 50%;
  display: block;
  object-fit: contain;
  max-height: 500px;
  margin: 0 auto;
  background: var(--bg-secondary);
}

/* SVG/Logo Image Dark Mode Support - Invert colors for dark mode */
.article-image img[src$=".svg"],
.post-image img[src$=".svg"],
.project-image img[src$=".svg"],
.article-image img[alt*="logo" i],
.post-image img[alt*="logo" i],
.project-image img[alt*="logo" i] {
  background: white;
  padding: 2rem;
}

[data-theme="light"] .article-image img[src$=".svg"],
[data-theme="light"] .post-image img[src$=".svg"],
[data-theme="light"] .project-image img[src$=".svg"],
[data-theme="light"] .article-image img[alt*="logo" i],
[data-theme="light"] .post-image img[alt*="logo" i],
[data-theme="light"] .project-image img[alt*="logo" i] {
  background: transparent;
  padding: 0;
}

/* Article Content - More spacious */
.article-content {
  padding: 4rem 0;
}

.article-content .container {
  max-width: 850px;
  padding: 0 2rem;
}

.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 3rem 0 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.article-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.article-content a:hover {
  color: var(--accent-secondary);
  text-decoration-thickness: 2px;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
}

.article-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 1.125rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem auto;
  display: block;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  overflow: hidden;
}

.article-content table th {
  background: var(--bg-tertiary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.article-content table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.article-content table tr:last-child td {
  border-bottom: none;
}

/* Article Footer */
.article-footer {
  padding: 3rem 0;
  background: var(--bg-secondary);
}

.article-footer .container {
  max-width: 850px;
  padding: 0 2rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.tags-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
}

.tag-link {
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag-link:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.article-footer .author-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
}

.article-footer .author-info h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.article-footer .author-info p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Mobile Optimizations - FIXES COMPRESSED CONTENT */
@media (max-width: 768px) {
  .article-header {
    padding: 3rem 0 2rem;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .article-content .container,
  .article-footer .container {
    padding: 0 1.5rem;
    max-width: 100%;
  }
  
  .article-content {
    font-size: 1rem;
    padding: 3rem 0;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
  }
  
  .article-content h3 {
    font-size: 1.25rem;
  }
  
  .article-content ul,
  .article-content ol {
    padding-left: 1.5rem;
  }
  
  .article-content pre {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .article-content table {
    font-size: 0.875rem;
  }
  
  .article-content table th,
  .article-content table td {
    padding: 0.75rem 0.5rem;
  }
  
  .article-tags {
    gap: 0.5rem;
  }
  
  .article-footer .author-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-content .container,
  .article-footer .container {
    padding: 0 1rem;
  }
  
  .article-meta {
    font-size: 0.875rem;
  }
  
  .article-content {
    font-size: 0.9375rem;
  }
}

.dark-only { display: block !important; }
.light-only { display: none !important; }

[data-theme="light"] .dark-only { display: none !important; }
[data-theme="light"] .light-only { display: block !important; }


.cert-logo {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  display: block;
}