:root{
  /* Color system - Gruvbox-inspired subdued dark theme */
  --bg: #282828;
  --bg-elevated: #3c3836;
  --bg-card: #32302f;
  --panel: #3c3836;
  --text: #ebdbb2;
  --text-muted: #a89984;
  --text-heading: #c3bcb5;
  --link: #83a598;
  --link-hover: #b9bb62;
  --border: #504945;
  --border-focus: #656b69;
  --tag-bg: #45403d;
  --tag-text: #d5c4a1;
  --accent-warm: #fe8019;
  --accent-green: #b8bb26;
  --accent-blue: #83a598;
  --accent-yellow: #fabd2f;

  /* Typography - matching mockup fonts */
  --font-sans: 'Inter', -apple-system, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --base: 16px;
  --lh: 1.6;

  /* Spacing + shape */
  --s1: 6px;
  --s2: 12px;
  --s3: 18px;
  --s4: 28px;
  --s5: 44px;
  --s6: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --max: 900px;

  /* Effects */
  --shadow: 0 4px 16px rgba(0,0,0,.25);
  --transition: all 0.1s ease;
  --transition-slow: all 0.15s ease;
  
  /* Scroll-based gradient position */
  --scroll-x: 0%;
}

/* ---------- Base / reset-ish ---------- */
*{ box-sizing: border-box; }
html{ font-size: 16px; }
body{
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

/* Extraordinarily subtle animated gradient for homepage */
/* body.homepage::before{
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: 
    linear-gradient(
      145deg,
      rgba(250, 189, 47, 0.07) 0%,
      rgba(250, 189, 47, 0.07) 4%,
      var(--bg) 12%,
      var(--bg) 18%,
      rgba(131, 165, 152, 0.06) 26%,
      var(--bg) 34%,
      var(--bg) 42%,
      rgba(184, 187, 38, 0.04) 50%,
      var(--bg) 58%,
      var(--bg) 66%,
      rgba(131, 165, 152, 0.06) 74%,
      var(--bg) 82%,
      var(--bg) 88%,
      rgba(250, 189, 47, 0.04) 94%,
      var(--bg) 98%,
      var(--bg) 100%
    );
  background-size: 700% 100%;
  background-position: var(--scroll-x) 0%;
  transition: background-position 0.1s linear;
} */


img{ max-width: 100%; height: auto; }
code, pre{ font-family: var(--font-mono); }
pre{
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--bg-card);
}

/* Lightbox for images */
.post-content img.lightbox-enabled{
  cursor: zoom-in;
  transition: var(--transition);
}
.post-content img.lightbox-enabled:hover{
  opacity: 0.85;
}

.lightbox-overlay{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lightbox-fade-in 0.2s ease;
}

.lightbox-overlay.active{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
}

.lightbox-image{
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  animation: lightbox-zoom-in 0.25s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close{
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
  line-height: 1;
  z-index: 10000;
}

.lightbox-close:hover{
  background: var(--bg-elevated);
  border-color: var(--border-focus);
  color: var(--link-hover);
}

@keyframes lightbox-fade-in{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

@keyframes lightbox-zoom-in{
  from{ 
    opacity: 0;
    transform: scale(0.9);
  }
  to{ 
    opacity: 1;
    transform: scale(1);
  }
}
code{
  padding: 0 .25em;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--accent-yellow);
}

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

hr{
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s4) 0;
}

/* ---------- Layout ---------- */
.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s5) var(--s3);
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(40, 40, 40, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s2);
  padding-bottom: var(--s2);
}

.site-title{
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.site-logo{
  width: 32px;
  height: 32px;
  display: block;
}

.site-nav{
  display: flex;
  gap: var(--s4);
  font-size: 0.95rem;
  font-family: var(--font-mono);
}
.site-nav a{
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}
.site-nav a:hover{
  color: var(--link);
}

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  margin-top: var(--s6);
}
.footer-inner{
  padding-top: var(--s4);
  padding-bottom: var(--s4);
  color: var(--text-muted);
  font-size: .9rem;
}
.footer-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
.footer-copyright p{
  margin: 0;
}
.footer-socials{
  display: flex;
  gap: var(--s3);
  align-items: center;
}
.footer-socials a{
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s1);
  border-radius: var(--radius);
}
.footer-socials a:hover{
  color: var(--link-hover);
  background: var(--bg-elevated);
}
.footer-socials svg,
.footer-socials .social-icon{
  display: block;
  transition: var(--transition);
}

/* ---------- Project Links ---------- */
.project-links{
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
}
.project-links .social-link{
  gap: var(--s1);
}
.project-links .social-link span{
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ---------- Global Social Icon Styling ---------- */
/* Inline SVG icons inherit color via currentColor */
.social-icon{
  width: 20px;
  height: 20px;
  display: block;
}
.social-link{
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s1);
  border-radius: var(--radius);
  text-decoration: none;
}
.social-link:hover{
  color: var(--link-hover);
  background: var(--bg-elevated);
}
.footer-links{ 
  display: flex; 
  gap: var(--s4); 
}
.footer-links a{ 
  color: var(--text-muted); 
  transition: var(--transition); 
  text-decoration: none;
}
.footer-links a:hover{ 
  color: var(--text); 
}

@media (max-width: 600px){
  .footer-content{
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);
  }
}

/* ---------- Devlog Navigation ---------- */
.devlog-nav{
  border-top: 1px solid var(--border);
  margin-top: var(--s6);
}
.devlog-nav-inner{
  padding-top: var(--s4);
  padding-bottom: var(--s4);
}
.devlog-nav-buttons{
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}
.devlog-nav-btn{
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-slow);
  flex: 1;
  max-width: 45%;
}
.devlog-nav-btn:hover{
  border-color: var(--border-focus);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}
.devlog-nav-prev{
  justify-content: flex-start;
}
.devlog-nav-next{
  justify-content: flex-end;
  text-align: right;
}
.devlog-nav-label{
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
}
.devlog-nav-direction{
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.devlog-nav-title{
  font-size: 0.9rem;
  color: var(--text-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.devlog-nav-disabled{
  visibility: hidden;
}
.devlog-nav svg{
  flex-shrink: 0;
  color: var(--accent-blue);
}

@media (max-width: 600px){
  .devlog-nav-buttons{
    flex-direction: column;
  }
  .devlog-nav-btn{
    max-width: 100%;
  }
  .devlog-nav-next{
    text-align: left;
  }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6{
  line-height: 1.2;
  margin: 0 0 var(--s3);
  color: var(--text-heading);
  font-weight: 700;
  text-transform: capitalize;
}
h1{ 
  font-size: clamp(2rem, 4vw, 2.5rem); 
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}
h2{ font-size: 1.5rem; margin-top: var(--s5); }
h3{ font-size: 1.25rem; margin-top: var(--s4); }
h2:first-child{ margin-top: var(--s2); }
h3:first-child{ margin-top: var(--s1); }

p{ margin: 0 0 var(--s3); color: var(--text); }
ul, ol{ margin: 0 0 var(--s3); padding-left: 1.25em; }

/* ---------- Post styles ---------- */
.post-header{ margin-bottom: var(--s4); }
.post-title{ margin-bottom: var(--s1); color: var(--text-heading); }
.post-meta{
  margin: 0;
  color: var(--text-muted);
  font-size: .9rem;
  font-family: var(--font-mono);
}

.post-content{
  background: var(--bg-card);
  /* border: 1px solid var(--border);
  border-radius: var(--radius); */
  padding: var(--s4);
}

/* ---------- Blog list ---------- */
.post-list{
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list-item{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
/* .post-list-item:hover{
  background: rgba(60, 56, 54, 0.5);
  padding-left: var(--s1);
  padding-right: var(--s1);
  border-radius: var(--radius);
} */
.post-list-date{
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
/* ---------- Card components (for projects/tools) ---------- */
.card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  transition: var(--transition-slow);
}
/* .card:hover{
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
} */

.card-grid{
  display: grid;
  gap: var(--s4);
  margin: var(--s4) 0;
}

.card-header{
  display: flex;
  gap: var(--s4);
  margin-bottom: var(--s3);
}

.card-thumbnail{
  width: 192px;
  height: 128px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(131, 165, 152, 0.15), rgba(184, 187, 38, 0.1));
  border: 1px solid var(--border);
}

.card-body{
  flex: 1;
}

.card-title{
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--s2);
  color: var(--text-heading);
}

.card-excerpt{
  color: var(--text-muted);
  margin-bottom: var(--s3);
  line-height: 1.6;
}

.card-tags{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-bottom: var(--s2);
}

.tag{
  display: inline-block;
  padding: 4px 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.tag:hover{
  background: var(--border-focus);
  color: var(--text-heading);
}

.card-link{
  color: var(--link);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}
.card-link:hover{
  color: var(--link-hover);
}

/* Responsive card layout */
@media (max-width: 768px) {
  .card-header{
    flex-direction: column;
  }
  .card-thumbnail{
    width: 100%;
  }
  
  /* Hide "GameSolids" text on mobile, keep logo */
  .site-title span{
    display: none;
  }
}

/* ---------- Sitemap page ---------- */
.sitemap-container{
  max-width: 800px;
  margin: 0 auto;
}

.sitemap-section{
  margin-bottom: var(--s5);
}

.sitemap-section h2{
  font-size: 1.5rem;
  margin-bottom: var(--s3);
  color: var(--text-heading);
  padding-bottom: var(--s2);
  border-bottom: 2px solid var(--border);
}

.sitemap-section ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-section li{
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
}

.sitemap-section li:last-child{
  border-bottom: none;
}

.sitemap-section .post-date{
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.sitemap-section .tag-list{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s2);
}

.sitemap-section .tag-list li{
  border-bottom: none;
  padding: var(--s2);
  background: var(--tag-bg);
  border-radius: var(--radius);
  transition: var(--transition);
}

.sitemap-section .tag-list li:hover{
  background: var(--border-focus);
}

/* Scrollable list for devlog section */
.scrollable-list{
  max-height: 400px;
  overflow-y: auto;
  /* border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated); */
  padding: var(--s2);
}

.scrollable-list::-webkit-scrollbar{
  width: 8px;
}

.scrollable-list::-webkit-scrollbar-track{
  background: var(--bg-card);
  border-radius: var(--radius);
}

.scrollable-list::-webkit-scrollbar-thumb{
  background: var(--border);
  border-radius: var(--radius);
}

.scrollable-list::-webkit-scrollbar-thumb:hover{
  background: var(--text-muted);
}

.post-count{
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}
