/* Override theme's narrow width for wider page margins */
#container > * {
  width: 900px !important;
  margin: 0 auto;
}

@media only screen and (max-width: 1000px) {
  #container > * {
    width: auto !important;
    margin: 0 1.5em;
  }
}

/* Modern Typography */
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
  font-size: 18px;
  line-height: 1.7;
  color: #2c3e50;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Ensure navigation menu is horizontal in one row */
#container nav ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  list-style: none !important;
}

#container nav ul li {
  margin-left: 0;
  margin-right: 0;
  list-style: none !important;
}

#container nav ul li.separator {
  color: #999;
  padding: 0 0.8em;
  font-size: 1.1rem;
}

/* Enhanced navigation styling */
#container nav {
  border-bottom: 2px solid #e0e0e0 !important;
  padding-bottom: 0.8em !important;
  margin-bottom: 2em !important;
}

#container nav ul li a {
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  padding: 0.3em 0;
}

#container nav ul li a:hover {
  color: #0066cc;
}

#container nav ul li a.active {
  border-bottom: 3px solid #0066cc !important;
  color: #0066cc;
}

/* Improved typography */
body {
  font-size: 18px;
  line-height: 1.7;
  color: #2c3e50;
}

h1 {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem !important;
  color: #1a1a1a !important;
  line-height: 1.3 !important;
}

h2 {
  font-size: 1.9rem !important;
  font-weight: 600 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  color: #2c3e50 !important;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.8rem !important;
}

/* Hide empty list items in aside */
aside ul li:empty {
  display: none !important;
}

aside ul li em:empty {
  display: none !important;
}

aside ul li:has(em:empty) {
  display: none !important;
  color: #34495e !important;
}

/* Header improvements */
#container header {
  margin-bottom: 2em !important;
  padding-top: 1.5em;
}

#container header h1 {
  font-size: 2.8rem !important;
  margin-bottom: 0.3em !important;
  letter-spacing: -0.02em;
}

#container header h1 a {
  color: #1a1a1a !important;
  text-decoration: none;
}

#container header h1 a:hover {
  color: #0066cc !important;
}

/* Improved content spacing */
article.content {
  margin-bottom: 3rem;
}

article.content p {
  margin-bottom: 1.3em;
}

article.content ul, article.content ol {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

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

/* Image handling */
img {
  max-width: 70% !important;
  height: auto !important;
  display: block !important;
  margin: 2rem auto !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Hero section image exception - must come after general img rules */
.hero-section img,
.hero-image img,
article.content .hero-section img,
article.content .hero-image img {
  max-width: 250px !important;
  width: 250px !important;
  height: 250px !important;
  margin: 0 !important;
  display: block !important;
}

/* Ensure GIFs animate properly */
img[src$=".gif"] {
  image-rendering: auto !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

article.content img {
  max-width: 70% !important;
  height: auto !important;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Hero section image exception */
article.content .hero-section img,
article.content .hero-image img {
  max-width: 250px !important;
  width: 250px !important;
  height: 250px !important;
  margin: 0 !important;
}

article.content p img {
  margin: 2rem auto;
}

article img {
  max-width: 70% !important;
  height: auto !important;
  display: block !important;
  margin: 2rem auto !important;
}

/* Hero section image exception */
article .hero-section img,
article .hero-image img {
  max-width: 250px !important;
  width: 250px !important;
  height: 250px !important;
  margin: 0 !important;
}

/* Link styling */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* Code blocks */
code {
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background-color: #f5f5f5;
  padding: 1.5em;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5em 0;
  border-left: 3px solid #0066cc;
}

/* Better footer spacing */
#container footer {
  margin-top: 4rem !important;
  padding-top: 2rem !important;
  border-top: 1px solid #e0e0e0;
}

/* Social media icons in header */
#social-media a {
  color: #555 !important;
  transition: color 0.3s ease;
}

#social-media a:hover {
  color: #0066cc !important;
}
/* Hero Section for About Page */
article.content .hero-section,
article .hero-section,
.hero-section {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2.5rem !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  padding: 2.5rem !important;
  border-radius: 12px !important;
  margin-bottom: 3rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

article.content .hero-image,
article .hero-image,
.hero-image {
  flex: 0 0 250px !important;
  min-width: 250px !important;
  display: block !important;
}

article.content .hero-image img,
article .hero-image img,
.hero-image img {
  width: 250px !important;
  height: 250px !important;
  max-width: 250px !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  margin: 0 !important;
  display: block !important;
}

article.content .hero-content,
article .hero-content,
.hero-content {
  flex: 1 !important;
  min-width: 0 !important;
}

article.content .hero-content h2,
article .hero-content h2,
.hero-content h2 {
  margin-top: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  font-size: 2rem !important;
}

article.content .hero-content p,
article .hero-content p,
.hero-content p {
  margin-bottom: 1rem !important;
}

@media only screen and (max-width: 768px) {
  .hero-section {
    flex-direction: column !important;
    text-align: center;
  }
  
  .hero-image {
    flex: 0 0 auto;
  }
}

/* Table Styling for About Page */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

table thead tr {
  background: #e9ecef;
  color: #333333;
  text-align: left;
  font-weight: 600;
}

table th,
table td {
  padding: 0.9rem 1.2rem;
}

table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

table tbody tr:nth-of-type(even) {
  background-color: #f8f9fa;
}

table tbody tr:last-of-type {
  border-bottom: none;
}

table tbody tr:hover {
  background-color: #e7f3ff;
  transition: background-color 0.2s ease;
}