/* SecOpsBro - Minimalist Cybersecurity Blog Styles */

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

html, body {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #111827;
  background-color: #ffffff;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

/* Utility Classes */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Typography */
.font-mono {
  font-family: 'Courier New', monospace;
}

/* Container */
.container {
  max-width: min(80rem, 100%);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Animation classes */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.hover\:-translate-y-1:hover {
  transform: translateY(-0.25rem);
}

/* Shadow utilities */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hover\:shadow-xl:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Header */
.header {
  border-bottom: 1px solid #e5e7eb;
  background: white;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo-section {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.tagline {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: 'Courier New', monospace;
  margin-top: 0.125rem;
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #374151;
}

@media (max-width: 992px) {
  .header-nav-container {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: block !important;
  }
}

@media (min-width: 993px) {
  .header-nav-container {
    display: flex !important;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
  }
  
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Search Form */
.search-form {
  display: flex;
  position: relative;
  margin-right: 1.5rem;
}

.search-input {
  width: 14rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  outline: none;
  transition: border-color 0.2s;
  background: #f9fafb;
}

.search-input:focus {
  border-color: #9ca3af;
  background: white;
}

.search-input::placeholder {
  color: #9ca3af;
  font-size: 0.75rem;
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 0.625rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
}

.search-btn:hover {
  color: #6b7280;
}

.search-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
  white-space: nowrap;
}

.nav a {
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: #6b7280;
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  background: white;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
}

.mobile-menu-content {
  position: relative;
  width: 100%;
  min-height: 100%;
  padding: 4rem 1rem 1rem;
  background: white;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.mobile-search {
  margin: 0 0 1.5rem 0;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.mobile-search input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: white;
  -webkit-appearance: none;
  appearance: none;
}

.mobile-search input:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.mobile-nav a {
  padding: 0.875rem;
  margin: 0.125rem 0;
  border-radius: 0.375rem;
  font-size: 1rem;
  text-decoration: none;
  color: #374151;
  text-align: left;
  transition: all 0.2s ease;
  background: transparent;
}

.mobile-nav a:last-child {
  margin-bottom: 1rem;
}

.mobile-nav a:hover {
  color: #0066ff;
  background: #f3f4f6;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .header {
    position: relative;
    width: 100%;
    max-width: 100vw;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 50;
  }

  .header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
  }

  .logo-section {
    text-align: center;
  }

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
  }

  .tagline {
    font-size: 0.75rem;
    margin-top: 0.125rem;
  }

  .header-right {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }

  .mobile-menu-btn {
    display: block;
    padding: 0.5rem;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #374151;
    z-index: 1001;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }
  
  .mobile-menu-close-btn {
    display: none;
    background: none;
    border: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    cursor: pointer;
    padding: 0.5rem;
    color: #374151;
  }
  
  .mobile-menu-close-btn svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .mobile-menu.active .mobile-menu-btn {
    display: none;
  }
  
  .mobile-menu.active .mobile-menu-close-btn {
    display: block;
  }

  .mobile-menu-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .header-nav-container {
    display: none;
  }
}

/* Featured Section */
.featured-section {
  background: #f3f4f6;
  padding: 3rem 0;
}

.featured-content {
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

.featured-badge {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.featured-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0.5rem 0 1rem 0;
  color: #111827;
}

.featured-meta {
  display: flex;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: #6b7280;
  margin: 1rem 0;
  gap: 0.5rem;
}

.featured-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 0.5rem;
  color: #d1d5db;
}

.featured-image-container {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: #f3f4f6;
  margin: 2rem 0;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-image-placeholder {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 1.125rem;
  font-weight: 500;
}

.featured-excerpt {
  color: #374151;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: #111827;
  color: white;
  padding: 0.5rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background: #1f2937;
  color: white;
}

.btn-primary svg {
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  background-color: #F3F4F6;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: #E5E7EB;
  color: #4B5563;
}

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

.category-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 9999px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.category-tag:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Articles Section */
.recent-articles {
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 2px;
  background-color: #000;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

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

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  max-height: 600px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
}

.article-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.article-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #f5f5f5;
}

.article-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  color: #666;
}

.article-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: calc(100% - 240px); /* Remaining height after image */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1a1a1a;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-tags {
  height: 32px; /* Fixed height for tags */
  margin-bottom: 1rem;
  overflow: hidden;
}

.article-title {
  height: 72px; /* Fixed height for title - approx 2-3 lines */
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  line-height: 1.4;
  overflow: hidden;
}

.article-title a {
  color: #1a1a1a;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-excerpt {
  height: 160px; /* Fixed height for excerpt */
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.article-date {
  font-size: 0.875rem;
  color: #6B7280;
}

.article-category {
  font-size: 0.875rem;
  color: #4B5563;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background-color: #F3F4F6;
  border-radius: 1rem;
}

/* Footer */
.footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 3rem 0 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

/* WordPress Core Styles */
.article-body {
  line-height: 1.8;
  color: #1a1a1a;
  font-size: 1.125rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* WordPress Block Editor Styles */
.wp-block-paragraph {
  margin-bottom: 1.5rem;
}

.wp-block-paragraph:last-child {
  margin-bottom: 0;
}

.wp-block-heading {
  margin: 2.5rem 0 1.5rem;
  color: #1a1a1a;
  line-height: 1.2;
}

.wp-block-heading:first-child {
  margin-top: 0;
}

/* WordPress Image Alignment */
.aligncenter {
  clear: both;
  display: block;
  margin: 2rem auto;
}

.alignleft {
  float: left;
  margin: 0.5rem 2rem 1rem 0;
  max-width: 50%;
}

.alignright {
  float: right;
  margin: 0.5rem 0 1rem 2rem;
  max-width: 50%;
}

/* Fix floated image spacing */
.article-body::after {
  content: "";
  display: table;
  clear: both;
}

/* Remove excess spacing from [clearboth] tags */
.article-body [clearboth],
.article-body .clearboth {
  clear: both;
  display: block;
  height: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
}

/* Image styling */
.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-body .wp-block-image {
  margin: 2rem 0;
}

.article-body .wp-block-image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Code blocks */
.article-body pre {
  background: #282c34;
  padding: 1.25rem;
  margin: 2rem 0;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.9em;
  line-height: 1.6;
}

.article-body code {
  background: #f5f7fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.9em;
  color: #e53e3e;
}

/* Typography */
.article-body p {
  margin: 0 0 1.5rem;
  line-height: 1.8;
}

.article-body h2 {
  font-size: 2em;
  margin: 2.5rem 0 1.5rem;
}

.article-body h3 {
  font-size: 1.5em;
  margin: 2rem 0 1rem;
}

/* Lists */
.article-body ul,
.article-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .article-body {
    font-size: 1rem;
  }

  .alignleft,
  .alignright {
    float: none;
    margin: 2rem auto;
    max-width: 100%;
  }
  
  .article-body pre {
    padding: 1rem;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .featured-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .featured-content,
  .container {
    padding: 0 1rem;
  }
}

/* Article Detail Styles */
.article-detail-section {
  padding: 3rem 0;
}

.article-detail-content {
  max-width: 48rem;
  margin: 0 auto;
}

.article-detail-header {
  margin-bottom: 3rem;
}

.article-detail-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.article-detail-body {
  line-height: 1.7;
  color: #374151;
  /* Remove invalid prose property */
}

.article-detail-body h1,
.article-detail-body h2,
.article-detail-body h3,
.article-detail-body h4,
.article-detail-body h5,
.article-detail-body h6 {
  color: #111827;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
}

.article-detail-body h2 {
  font-size: 1.875rem;
}

.article-detail-body h3 {
  font-size: 1.5rem;
}

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

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

.article-detail-body li {
  margin-bottom: 0.5rem;
}

.article-detail-body code {
  background: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
}

.article-detail-body pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-detail-body blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

/* Share buttons */
.share-button {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  margin-right: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* Code Blocks & Pre */
.article-content pre,
.article-content code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    margin: 1.5em 0;
    padding: 1em;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
    tab-size: 4;
}

/* Inline Code */
.article-content code:not(pre code) {
    background: rgba(0,0,0,0.05);
    color: #b91c1c;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.875em;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

/* Blockquotes */
.article-content blockquote {
    margin: 2em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #0066ff;
    background: #f8fafc;
    color: #374151;
    font-style: italic;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

.article-content figure {
    margin: 2em 0;
}

.article-content figcaption {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5em;
}

/* Tables */
.article-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.article-content th {
    background: #f8fafc;
    font-weight: 600;
}

/* Code Highlighting for Malware Analysis */
.malware-analysis {
    position: relative;
    margin: 2em 0;
}

.malware-analysis::before {
    content: "⚠️ Malware Sample";
    position: absolute;
    top: -1.5em;
    left: 0;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
}

.malware-analysis pre {
    background: #1a1a1a;
    border: 1px solid #dc2626;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1);
}

/* Syntax Highlighting */
.hljs-keyword { color: #569cd6; }
.hljs-string { color: #ce9178; }
.hljs-comment { color: #6a9955; }
.hljs-function { color: #dcdcaa; }
.hljs-number { color: #b5cea8; }
.hljs-operator { color: #d4d4d4; }
.hljs-class { color: #4ec9b0; }
.hljs-variable { color: #9cdcfe; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content pre,
    .article-content code {
        font-size: 0.8em;
    }
    
    .article-content blockquote {
        margin: 1.5em 0;
        padding: 0.75em 1em;
    }
}

/* Print Styles */
@media print {
    .article-content {
        font-size: 12pt;
    }

    .article-content pre,
    .article-content code {
        background: #f8f8f8;
        border: 1px solid #ddd;
        color: #1a1a1a;
    }
    
    .article-content a {
        text-decoration: underline;
        color: #1a1a1a;
    }
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem;
    width: calc(100% - 2rem);
    max-width: 1200px;
}

@media (min-width: 768px) {
    .article-layout {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin: 2rem auto;
    }
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* Related Articles Cards */
.related-articles {
    margin-bottom: 2rem;
}

.related-article-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.related-article-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-article-content {
    padding: 1rem;
}

.related-article-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.related-article-content h4 a {
    color: #111827;
    text-decoration: none;
}

.related-article-content h4 a:hover {
    color: #4B5563;
}

.related-article-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.5;
}

.related-article-date {
    font-size: 0.8rem;
    color: #9CA3AF;
}

/* Article Navigation Cards */
.article-navigation {
    margin-top: 4rem;
    padding: 4rem 0;  /* Add vertical padding */
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;  /* Light background to define the section */
}

.article-navigation-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 3rem;  /* Increased bottom margin */
    text-align: center;
}

.article-navigation-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;  /* Control maximum width */
    margin: 0 auto;     /* Center horizontally */
    padding: 0 2rem;    /* Add horizontal padding */
}

.article-nav-link {
    position: relative;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 160px;  /* Ensure consistent height */
    justify-content: center;  /* Center content vertically */
}

.article-nav-link:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.article-nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;  /* Center content vertically */
    flex: 1;                 /* Take full height */
}

.article-nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.article-nav-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.article-nav-prev .article-nav-direction {
    color: #4b5563;
}

.article-nav-next {
    text-align: right;
}

.article-nav-next .article-nav-direction {
    justify-content: flex-end;
    color: #4b5563;
}

@media (max-width: 640px) {
    .article-navigation {
        padding: 3rem 1rem;  /* Smaller padding on mobile */
    }
    
    .article-nav-link {
        min-height: 120px;  /* Smaller height on mobile */
    }
    
    .article-navigation-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .article-nav-next {
        text-align: left;
    }

    .article-nav-next .article-nav-direction {
        justify-content: flex-start;
    }
}

/* Media and Appearances Section */
.media-section {
    padding: 2rem 0;
    background: #f5f5f5;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.media-card {
    background: white;
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.media-card:hover {
    transform: translateY(-2px);
}

.media-card-icon {
    font-size: 2.5rem;
    color: #0066ff;
    margin-bottom: 1rem;
}

.media-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #0066ff;
    line-height: 1.2;
}

.media-card-description {
    color: #666;
    font-size: 0.875rem;
    margin-top: auto;
}

.media-link {
    text-decoration: none;
    height: 100%;
    display: block;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .media-card {
        padding: 1.5rem;
    }
    
    .media-card-icon {
        font-size: 2rem;
    }
    
    .media-card-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .media-card {
        padding: 1.25rem;
    }
}

/* Global image handling */
img {
  max-width: 100%;
  height: auto;
}

/* Code block handling */
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Table handling */
table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* Mobile viewport fixes */
@supports (padding: max(0px)) {
  .mobile-menu {
    padding-top: max(4rem, env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .mobile-menu-content {
    padding-top: max(4rem, env(safe-area-inset-top));
  }

  .mobile-menu-close-btn {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
  }
}

/* Mobile menu responsiveness improvements */
@media (max-width: 992px) {
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav {
    margin-top: 1rem;
  }

  .mobile-nav a {
    font-size: 1.125rem;
    padding: 1rem;
    margin: 0.25rem 0;
  }
}

/* Footer Responsive Styles */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-heading {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: #999;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #999;
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: #fff;
}

.footer-copyright {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
}

.footer-copyright p {
    color: #999;
    font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .site-footer {
        padding: 3rem 0 1.5rem;
    }

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

    .footer-heading {
        font-size: 1.125rem;
    }
    
    .social-links {
        justify-content: center;
    }

    .footer-copyright {
        margin-top: 2rem;
        padding: 1.5rem 1rem 0;
    }
    
    .footer-copyright p {
        font-size: 0.8125rem;
    }
}

/* About Page Styles */
.profile-section {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.profile-image {
    position: relative;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 767px) {
    .profile-image {
        min-height: 300px;
    }
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    border-radius: 8px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
