:root{
  --bg: #fefefe;
  --fg: #2a2a2a;
  --muted: #666;
  --border: #e0e0e0;
  --accent: #d63384;
  --secondary: #0d6efd;
  --tertiary: #20c997;
  --link: #0d6efd;
  --wrap: 800px;
  --card-bg: #ffffff;
  --card-border: #f0f0f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  
  /* Logo colors adapted from original */
  --logo-green: #00cc66;
  --logo-black: #000;
  --main-font: "Londrina Solid", cursive;
  --outline-font: "Londrina Outline", cursive;
}

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

body{
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.7 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a{ 
  color: var(--link); 
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover{ 
  color: var(--accent);
}

.wrapper{ 
  max-width: var(--wrap); 
  margin: 0 auto; 
  padding: 0 20px; 
}

/* Header */
.site-header{
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 20px 0;
}
.site-header .wrapper{ 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px; 
}

.site-title{ 
  font-size: 24px; 
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  text-shadow: none;
}
.site-title:hover{
  color: var(--accent);
}

.site-nav{ 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex-wrap: wrap; 
}
.site-nav a{ 
  color: var(--muted); 
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}
.site-nav a:hover{
  color: var(--logo-green);
  background: rgba(0,204,102,0.1);
}

/* JCMC Logo Styles */
.logo-link {
  text-decoration: none;
  display: block;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.header-logo {
  display: inline-block;
  position: relative;
}

.header-logo .title {
  font-family: var(--main-font);
  font-size: 48px;
  padding: 0 10px 6px 4px;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.header-logo *, .header-logo ::before, .header-logo ::after {
  box-sizing: border-box;
}

.header-logo .name, .header-logo .logo {
  color: var(--logo-green);
  display: inline-block;
}

.header-logo .name {
  margin-right: 8px;
}

.header-logo .logo {
  transform: rotate(-90deg);
}

.header-logo .outline {
  font-family: var(--outline-font);
  color: var(--logo-black);
  position: absolute;
  top: 0;
  left: 5px;
  z-index: 2;
}

.logo.outline {
  left: 105px;
}

.header-logo .eyes {
  position: relative;
  top: -0.11em;
}

/* Responsive logo */
@media (max-width: 768px) {
  .header-logo .title {
    font-size: 36px;
    padding: 0 8px 4px 3px;
  }
  .header-logo .outline {
    left: 4px;
  }
  .logo.outline {
    left: 80px;
  }
}

/* Main Content */
.page-content{
  padding: 40px 0;
}

.intro{
  margin-bottom: 40px;
  text-align: center;
}
.intro h1{
  font-size: 32px;
  margin: 0 0 12px;
  color: var(--fg);
}
.intro p{
  font-size: 20px;
  color: var(--muted);
  margin: 0;
  max-width: 500px;
  margin: 0 auto;
}

/* Article List */
.post-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-list li{ 
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.post-list li:hover{
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.post-meta{
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.post-list h3{
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}
.post-link{
  color: var(--fg);
  text-decoration: none;
}
.post-link:hover{
  color: var(--accent);
}

.post-list p{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* Categories/Tags */
.post-category, .post-tag{
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* Pagination */
.pagination{ 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  justify-content: center; 
  margin: 32px 0; 
  list-style: none;
  padding: 0;
}
.pagination li{ 
  padding: 8px 12px; 
  border-radius: 6px; 
  background: var(--card-bg);
  border: 1px solid var(--border); 
}
.pagination a{
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination a:hover{
  color: var(--accent);
}
.pagination .current{ 
  background: var(--accent); 
  color: white; 
  border-color: var(--accent);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Newsletter Signup */
.footer-signup{
  text-align: center; 
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 24px; 
  margin: 40px 0;
  box-shadow: var(--shadow);
}
.footer-signup h3{ 
  font-size: 20px; 
  margin: 0 0 16px;
  color: var(--fg);
}
.footer-signup .btn{
  display: inline-block; 
  background: var(--accent);
  border: none; 
  padding: 12px 24px; 
  border-radius: 6px;
  font-weight: 600; 
  text-decoration: none;
  color: white;
  transition: all 0.2s ease;
}
.footer-signup .btn:hover{ 
  background: #b02a5b;
  transform: translateY(-1px);
}

/* Article page styles */
.article-header{
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-title{
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.2;
}
.article-meta{
  color: var(--muted);
  font-size: 16px;
}

.article-content{
  max-width: 65ch;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.8;
}
.article-content h2{
  font-size: 24px;
  margin: 32px 0 16px;
  color: var(--fg);
}
.article-content h3{
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--fg);
}
.article-content p{
  margin-bottom: 20px;
}
.article-content blockquote{
  border-left: 4px solid var(--accent);
  margin: 24px 0;
  padding: 16px 20px;
  background: rgba(214,51,132,0.05);
  border-radius: 4px;
}
.article-content ul, .article-content ol{
  margin-bottom: 20px;
  padding-left: 24px;
}
.article-content li{
  margin-bottom: 8px;
}

/* Missing Markdown styling for article content */
.article-content strong,
.article-content b {
  font-weight: bold;
  color: var(--fg);
}

.article-content em,
.article-content i {
  font-style: italic;
}

.article-content ul li {
  list-style-type: disc;
  margin-left: 0;
}

.article-content ol li {
  list-style-type: decimal;
  margin-left: 0;
}

.article-content code {
  background: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #f8f8f8;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 16px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header .wrapper {
    flex-direction: column;
    gap: 12px;
  }
  .site-nav {
    gap: 8px;
    justify-content: center;
  }
  .site-nav a {
    padding: 4px 8px;
    font-size: 13px;
  }
  .intro h1 {
    font-size: 28px;
  }
  .intro p {
    font-size: 18px;
  }
  .post-list li {
    padding: 20px;
  }
  .wrapper {
    padding: 0 16px;
  }
  .lego-wrapper {
    gap: 12px;
  }
  .lego_gallery {
    width: calc(50% - 6px);
  }
}

/* Lego Gallery Styles */
.lego-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.lego_gallery {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.lego_gallery:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.lego_gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.lego_gallery .desc {
  padding: 12px;
  font-size: 14px;
  color: var(--fg);
  text-align: center;
  background: var(--card-bg);
}

.lego_gallery a {
  text-decoration: none;
  display: block;
}

/* Page-specific intro text */
.page-intro {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: none;
}

/* Books table styling */
.book_tracker {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.book_tracker thead {
  background: var(--accent);
  color: white;
}

.book_tracker th,
.book_tracker td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.book_tracker th {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.book_tracker tbody tr:hover {
  background: #f8f9fa;
}

.book_tracker .book_index {
  text-align: center;
  font-weight: bold;
  color: var(--accent);
  width: 80px;
}

.book_tracker tbody tr:last-child td {
  border-bottom: none;
}

/* Year navigation styling */
.year-navigation {
  margin: 2rem 0;
  text-align: center;
}

.year-navigation h3 {
  font-size: 1.2rem;
  color: var(--fg);
  margin-bottom: 1rem;
  font-weight: 600;
}

.year-link {
  display: inline-block;
  margin: 0 0.3rem 0.5rem 0;
  padding: 0.6rem 1.2rem;
  background: var(--card-bg);
  color: var(--muted) !important;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid var(--border);
  transition: all 0.2s ease;
}

.year-link:hover {
  background: var(--logo-green);
  color: white !important;
  border-color: var(--logo-green);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,204,102,0.25);
}

.year-link.current {
  background: var(--logo-green);
  color: white !important;
  border-color: var(--logo-green);
  box-shadow: 0 2px 8px rgba(0,204,102,0.3);
}

/* Green accent for special tech-related links */
.article-content a[href*="github.com"],
.article-content a[href*="netlify.com"],
.article-content a[href*="aws.amazon.com"] {
  color: var(--logo-green);
}

.article-content a[href*="github.com"]:hover,
.article-content a[href*="netlify.com"]:hover,
.article-content a[href*="aws.amazon.com"]:hover {
  color: var(--logo-green);
  opacity: 0.8;
}

@media (max-width: 768px) {
  .book_tracker {
    font-size: 14px;
  }
  
  .book_tracker th,
  .book_tracker td {
    padding: 0.75rem 0.5rem;
  }
  
  .book_tracker .book_index {
    width: 60px;
  }
  
  /* Stack year navigation on mobile */
  .year-link {
    margin: 0.2rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  /* Mobile category filter */
  .category-filter {
    gap: 8px !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
  }
  
  .filter-btn {
    flex-shrink: 0;
    font-size: 13px !important;
    padding: 8px 12px !important;
    white-space: nowrap;
  }
}

/* Category Filter Styles */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  justify-content: center;
}

.filter-btn {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: var(--logo-green);
  color: white;
  border-color: var(--logo-green);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,204,102,0.25);
}

.filter-btn.active {
  background: var(--logo-green);
  color: white;
  border-color: var(--logo-green);
  box-shadow: 0 2px 8px rgba(0,204,102,0.3);
}

.filter-btn.active:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,204,102,0.4);
}

/* Post item animations */
.post-item {
  transition: opacity 0.2s ease;
}

/* Hey/Links Page Styles */
.hey-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hey-link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  color: var(--fg);
}

.hey-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.hey-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  flex-shrink: 0;
}

.hey-link-card:hover .hey-link-icon {
  transform: scale(1.1);
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(214,51,132,0.3);
}

.hey-link-text {
  font-size: 16px;
  font-weight: 500;
  text-transform: capitalize;
}

@media (max-width: 768px) {
  .hey-links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0;
  }
  
  .hey-link-card {
    padding: 16px;
    gap: 12px;
  }
  
  .hey-link-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .hey-link-text {
    font-size: 15px;
  }
}

/* Disclaimer Page Styles */
.disclaimer {
  text-align: center;
  font-size: 20px;
  line-height: 1.8;
  margin: 40px 0;
  padding: 30px;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Trajan Pro', 'Optima', 'Copperplate', 'Copperplate Gothic', 'Times New Roman', serif;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.disclaimer_button {
  text-align: center;
  margin: 30px 0;
}

.disclaimer_button button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.disclaimer_button button:hover {
  background: #b02a5b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.disclaimer_button a {
  text-decoration: none;
}

/* 404 Page Styles - Only apply to pages with slug '404' */
body[data-page-slug="404"] .page-content article,
.page-content article:has(h1:contains("Page Not Found")),
.page-404 .page-content article {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

body[data-page-slug="404"] .page-content article h1,
.page-404 .page-content article h1 {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 20px;
  text-align: center;
}

body[data-page-slug="404"] .page-content article h2,
.page-404 .page-content article h2 {
  font-size: 24px;
  color: var(--fg);
  margin: 30px 0 20px;
  text-align: center;
}

body[data-page-slug="404"] .page-content article ul,
.page-404 .page-content article ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

body[data-page-slug="404"] .page-content article ul li,
.page-404 .page-content article ul li {
  margin: 12px 0;
}

body[data-page-slug="404"] .page-content article ul li a,
.page-404 .page-content article ul li a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

body[data-page-slug="404"] .page-content article ul li a:hover,
.page-404 .page-content article ul li a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

body[data-page-slug="404"] .page-content article em,
.page-404 .page-content article em {
  color: var(--muted);
  font-style: italic;
  margin-top: 40px;
  display: block;
}