:root{
  --bg-light:#F4EDE4;       /* coffee-cream */
  --bg-dark:#1E1E1E;        /* editor dark */
  --text:#2B2B2B;
  --muted:#5b5b5b;
  --mint:#A6E3A1;           /* code-accent */
  --amber:#D8A35D;          /* coffee accent */
  --card:#ffffff;
  --ring:rgba(0,0,0,0.06);
  --radius:16px;
  --space: clamp(12px, 2vw, 20px);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:#faf8f6;
  line-height:1.6;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Hero (split) */
.site-header .hero{
  position:relative;
  background:
    linear-gradient(120deg, var(--bg-light) 48%, rgba(244,237,228,0) 48%),
    linear-gradient(120deg, rgba(0,0,0,0) 49%, var(--bg-dark) 49%);
  min-height: 42vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 300px at 70% 50%, rgba(166,227,161,0.15), transparent 60%),
    radial-gradient(900px 200px at 72% 52%, rgba(255,184,108,0.12), transparent 60%);
  pointer-events:none;
}
.hero-inner{
  text-align:center;
  padding: 40px 16px;
}
.brand{
  margin:0 0 8px 0;
  font-weight:800;
  letter-spacing:0.06em;
  font-size: clamp(28px, 5vw, 48px);
}
.highlight {
  color: #F4EDE4; /* same cream tone as background */
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}
.tagline{
  margin:0;
  font-size: clamp(14px, 2.2vw, 18px);
  color:#333;
}
.byline{
  margin:8px 0 0;
  font-size:14px;
  color:var(--muted);
}

/* Navbar */
.navbar{
  display:flex;
  gap:12px;
  justify-content:center;
  align-items: center;
  background:#fff;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
  position:sticky;
  top:0;
  z-index:10;
  padding:10px 12px;
  flex-wrap: wrap;
}
.navbar a{
  text-decoration:none;
  padding:8px 12px;
  border-radius:999px;
  color:#111;
  font-weight:600;
  background:#f5f5f5;
  transition:transform .06s ease, background .2s ease, box-shadow .2s ease;
  box-shadow:0 0 0 1px rgba(0,0,0,0.04) inset;
}
.navbar a:hover {
  background: #efefef;
  transform: translateY(-1px);
}
.navbar a.active{
  background:var(--bg-dark);
  color:#fff;
  box-shadow:0 0 0 2px var(--mint) inset;
}
tag-bar {
  display: flex;
  justify-content: center;   /* centers horizontally */
  flex-wrap: wrap;            /* keeps it neat on smaller screens */
  gap: 1rem;                  /* even spacing between links */
  padding: 1rem 0;
}

/* Layout */
.container{
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--space)*1.5) var(--space);
}
.section-title{
  margin: 0 0 12px 0;
  font-size: clamp(18px, 3vw, 22px);
  font-weight:800;
  letter-spacing:.02em;
}

/* Cards */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space);
}
.grid > .card{ grid-column: span 12 }
@media (min-width: 720px){
  .grid > .card{ grid-column: span 4 }
}
.card{
  background:var(--card);
  border-radius: var(--radius);
  box-shadow:
    0 1px 1px var(--ring),
    0 8px 24px rgba(0,0,0,0.05);
  overflow:hidden;
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow:
    0 1px 1px var(--ring),
    0 16px 38px rgba(0,0,0,0.08);
}
.card-link{ 
  text-decoration:none; 
  color:inherit; 
  display:block }
.card-body{ padding: 18px }
.card-title{
  margin:0 0 6px 0;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight:800;
}
.card-meta{
  margin:0 0 8px 0;
  color:var(--muted);
  font-size: 13px;
}
.card-text{
  margin:0 0 8px 0;
  font-size: 15px;
}
.read-more{
  display:inline-block;
  font-weight:600;
  color:var(--bg-dark);
  border-bottom:2px solid var(--amber);
}

/* Featured */
.featured .card-featured{
  border:1px solid #eee;
}
.featured .card-title{
  font-size: clamp(18px, 3vw, 24px);
}

/* Mini header for category pages */
.mini-header{
  padding: 20px var(--space);
  background: linear-gradient(90deg, var(--bg-light), #fff);
  border-bottom:1px solid #eee;
}
.home-link{
  display:inline-block;
  text-decoration:none;
  color:#333;
  font-weight:600;
  margin-bottom:6px;
}
.page-title{ 
  margin:0; 
  font-size: clamp(22px, 4vw, 32px); 
  font-weight:800 
}
.page-sub{ 
  margin:6px 0 0; 
  color:var(--muted) 
}

/* Footer */
.site-footer{
  text-align:center;
  padding: 24px var(--space) 40px;
  color:#666;
  font-size:14px;
}

/* Code accent (future use) */
code, .code{
  font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background:#111;
  color:var(--mint);
  padding:2px 6px;
  border-radius:8px;
}




/* Post page */
.post {
  max-width: 760px;
  margin: 0 auto;
}
.post-header {
  margin-bottom: 24px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}
.post-title {
  margin: 0;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
}
.post-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}
.post-body p {
  margin: 16px 0;
  font-size: 17px;
  line-height: 1.75;
}
.post-footer {
  margin-top: 32px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}
.tags span {
  background: #f4ede4;
  color: #1e1e1e;
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 13px;
}
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.post-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--bg-dark);
}
.post-nav a.next {
  color: var(--amber);
}


/* About + Visual Trio */
.about {
  background: #f9f7f5;
  padding: 40px var(--space);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  text-align: center;
}

.about-text {
  max-width: 720px;
  margin: 0 auto 10px;
  font-size: 17px;
  line-height: 1.7;
}

.about-quote {
  color: var(--amber);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 28px;
}

.visual-trio {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.visual-trio .trio {
  width: 220px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform .1s ease, box-shadow .2s ease;
}

.visual-trio .trio:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.visual-trio img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.visual-trio h3 {
  margin: 10px 0 14px;
  font-size: 18px;
  color: var(--bg-dark);
}


/* Quote Block */
.quote-block {
  background: #fff;
  color: #1e1e1e;
  padding: 60px 20px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin: 60px auto;
  text-align: center;
  max-width: 800px;
}

.quote-block blockquote {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 12px 0;
  font-style: italic;
}

.quote-block .quote-author {
  color: var(--amber);
  font-size: 16px;
  font-weight: 600;
}


.quote-block {
  animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  text-align: center;
  padding: 20px 0;
  background: #fff;
  color: #666;
  border-top: 1px solid #eee;
}

pre, code {
  background-color: #1e1e1e;
  color: #a6e3a1;
  font-family: 'JetBrains Mono', monospace;
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;      /* Wrap long lines */
  word-wrap: break-word;      /* Ensure no overflow */
  display: block;
}
/* Tag bar: desktop + mobile */
.tag-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;                /* Default desktop behavior */
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  max-width: 90%;
}

/* Each tag */
.tag-bar a {
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  white-space: nowrap;
}

/* Highlight active tag */
.tag-bar a.active {
  background: #000;
  color: #fff;
}

/* Small screens: horizontal scroll instead of wrap */
@media (max-width: 600px) {
  body {
    padding: 0;
    margin: 0;
    font-size: 16px;
  }

  .container {
    padding: 1rem;
  }

  .hero-inner {
    padding: 24px 12px;
  }

  .about-text {
    font-size: 15px;
    line-height: 1.6;
  }

  footer {
    padding: 1rem 0;
    font-size: 0.85rem;
  }
}
  .tag-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px;
    scrollbar-width: none;
  }
  .tag-bar::-webkit-scrollbar {
    display: none;                  /* hide scrollbar (Chrome/Safari) */
  }