:root {
  --bg: #F9F9F7;
  --surface: #FFFFFF;
  --border: #E4E4E0;
  --text: #1A1A18;
  --muted: #7A7A72;
  --accent: #2B2B28;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: 780px;
  margin: auto;
  padding: 2rem 1rem;
}

.container-wide {
  max-width: 900px;
  margin: auto;
  padding: 2rem 1rem;
}

.blog-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

/* Status badge */
.badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
}

.badge.active { color: green; }
.badge.completed { color: blue; }
.badge.paused { color: goldenrod; }
.badge.dropped { color: red; }

/* Hero */
.hero {
  margin-bottom: 2rem;
}

.display {
  font-size: 2.2rem;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* Feed */
.feed-card {
  transition: 0.15s ease;
}

.feed-card:hover {
  border-color: #d0d0cc;
}

/* Meta */
.feed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.project-link {
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}

/* Title */
.feed-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

/* Excerpt */
.feed-excerpt {
  color: var(--muted);
  margin-bottom: 12px;
}

/* Footer */
.feed-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.read-more {
  text-decoration: none;
  color: var(--text);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 0;
}

/* CTA */
.view-all {
  margin-top: 2rem;
}

.cover {
  width:100%;
  height:160px;
  object-fit:cover;
  margin-bottom:10px;
  border-radius:4px;
}

.tags {
  margin:8px 0;
}

.tag {
  display:inline-block;
  font-size:12px;
  border:1px solid var(--border);
  padding:2px 6px;
  margin-right:5px;
  border-radius:4px;
}

.admin-container {
  max-width:900px;
  padding:2rem;
  margin: 0% 20%;
}

.admin-card {
  background:#fff;
  border:1px solid var(--border);
  padding:1rem;
  margin-bottom:1rem;
  border-radius:4px;
}

.admin-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.admin-actions a {
  margin-left:10px;
  font-size:13px;
  color:var(--muted);
}

input, textarea, select {
  width:100%;
  padding:10px;
  border:1px solid var(--border);
  margin-bottom:10px;
  border-radius:4px;
  font-size:14px;
}

button {
  padding:10px 14px;
  border:none;
  background:#1A1A18;
  color:#fff;
  cursor:pointer;
  margin-top: 10px;
}

.timeline {
  display: flex;
  margin-bottom: 20px;
}

.timeline .date {
  width: 120px;
  font-size: 12px;
  color: var(--muted);
}

.timeline .content {
  flex: 1;
  border-left: 2px solid var(--border);
  padding-left: 15px;
}

/* =========================
   NAVBAR
========================= */

.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: auto;
  padding: 1.2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-family: "Instrument Serif", serif;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  color: var(--text);
}

/* Nav links */
.nav a {
  text-decoration: none;
  color: var(--muted);
  margin-left: 1.5rem;
  font-size: 14px;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

/* =========================
   FOOTER
========================= */

footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
}

footer p {
  font-size: 13px;
  color: var(--muted);
}

/* =========================
   TYPOGRAPHY IMPROVEMENTS
========================= */

h1, h2, h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 500;
}

p {
  font-size: 15px;
}

/* =========================
   BUTTONS / LINKS
========================= */

a {
  color: var(--text);
}

a:hover {
  opacity: 0.7;
}

/* =========================
   RESPONSIVE NAV (MOBILE)
========================= */

@media (max-width: 600px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav nav {
    margin-top: 10px;
  }

  .nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}

label {
  display:block;
  font-size:13px;
  margin-bottom:5px;
  color:var(--muted);
}

input, textarea, select {
  width:100%;
  padding:10px;
  border:1px solid var(--border);
  border-radius:4px;
  margin-bottom:15px;
  font-size:14px;
}

textarea {
  min-height:100px;
}

button {
  padding:10px 14px;
  background:var(--text);
  color:#fff;
  border:none;
  border-radius:4px;
  cursor:pointer;
  margin-top:10px;
}

.links a,
.project-links a {
  font-size: 13px;
  margin-right: 10px;
  text-decoration: none;
  color: var(--text);
}

.links {
  margin: 8px 0;
}

.project-links {
  margin: 10px 0 20px;
}

.carousel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-bottom: 20px;
}

.carousel-img {
  height: 180px;
  border-radius: 6px;
}

/* Blog cards */
.blog-card {
  margin-bottom: 1.5rem;
}

/* Markdown content */
.markdown {
  line-height: 1.7;
}

.markdown h1, .markdown h2 {
  margin-top: 1.5rem;
}

.markdown p {
  margin-bottom: 1rem;
}

.markdown pre {
  background: #f4f4f4;
  padding: 10px;
  overflow-x: auto;
}

/* Admin preview */
.preview {
  border: 1px solid var(--border);
  padding: 10px;
  margin-top: 10px;
  background: #fff;
}

/* Page title */
.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Filters */
.filters {
  margin-bottom: 1.5rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--text);
  padding: 6px 12px;
  margin-right: 8px;
  cursor: pointer;
  border-radius: 20px;
  font-size: 13px;
}

.filter-btn.active {
  background: var(--text);
  color: #fff;
}

/* Better card */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card h3 {
  font-size: 1.1rem;
  margin: 8px 0;
}

/* Image fix */
.cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
}

/* Tags */
.tags {
  margin: 8px 0;
}

.tag {
  font-size: 11px;
  border: 1px solid var(--border);
  padding: 2px 6px;
  margin-right: 5px;
  border-radius: 4px;
}

/* Links */
.links {
  margin-top: auto;
  margin-bottom: 8px;
}

.links a {
  font-size: 13px;
  margin-right: 10px;
  color: var(--muted);
}

/* Footer */
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hover */
.project-card:hover {
  border-color: #d0d0cc;
}

/* Smooth transition */
.project-card {
  transition: 0.15s ease;
}

.admin-nav {
  background: #1A1A18;
}

.admin-nav a {
  color: #ccc;
}

.admin-nav a:hover {
  color: #fff;
}

.home-section {
  margin-top: 3rem;
}

.section-header {
  display:flex;
  justify-content:space-between;
  margin-bottom:1rem;
}

/* Sticky layout */
body {
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

.footer {
  margin-top:auto;
  border-top:1px solid var(--border);
  padding:2rem 1rem;
}

.footer-grid {
  display:grid;
  gap:1.5rem;
  grid-template-columns: repeat(5,1fr);
}

@media(min-width:600px){
  .footer-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media(min-width:960px){
  .footer-grid {
    grid-template-columns: repeat(5,1fr);
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer h4 {
  margin-bottom:8px;
}

.footer a {
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:5px;
}

.footer-bottom {
  margin-top:2rem;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

.about-editor {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
}

.markdown ul {
  padding-left: 20px;
  margin-bottom: 1rem;
}

.about-container li,
.markdown li {
  margin-bottom: 6px;
  list-style: disc;
}
.about-container {
  margin: 2rem auto 2rem;
  max-width: 720px;
  padding: 1.5rem;
  border-radius: 4px;
}

.project-card .grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Header row */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Button */
.btn {
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
}

/* Project row */
.project-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

/* Left side */
.project-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

/* Right side */
.project-actions {
  text-align: right;
}

.actions a {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Blog row */
.blog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-info {
  max-width: 70%;
}

.excerpt {
  font-size: 14px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 600px) {
  .project-row,
  .blog-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-actions,
  .blog-actions {
    margin-top: 10px;
  }
}

/* Stats grid */
.stats-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 6px;
  text-align: left;
  transition: 0.15s ease;
}

.stat-card:hover {
  border-color: #d0d0cc;
}

/* Number */
.stat-card h3 {
  font-size: 2rem;
  margin-bottom: 5px;
}

/* Label */
.stat-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Link */
.stat-card a {
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
}
