:root {
  --bg: #0e0e0e;
  --card-bg: #161616;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --border: #2a2a2a;
  --link: #8ab4ff;
  --accent: #6366f1;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

/* --- Links --- */

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

a:hover {
  text-decoration: underline;
}

/* --- Header --- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.5rem 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-header h1 a {
  color: var(--text);
}

.site-header p {
  margin: 0.3rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tag-link {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--card-bg);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.tag-link:hover {
  color: var(--text);
  background: var(--border);
  text-decoration: none;
}

/* --- Main Content & Grid --- */

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.grid-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* --- Project Cards --- */

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
}

.category-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.6rem;
}

.project-title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.8rem 0;
  font-weight: 600;
}

.project-title a {
  color: var(--text);
}

.project-description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  /* Truncate text after 3 lines for clean grid alignment */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Card Footer & Buttons --- */

.card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* Keeps footer items aligned at bottom */
}

.author-info {
  display: flex;
  flex-direction: column;
  max-width: 60%;
}

.by-label {
  font-size: 0.7rem;
  color: #555;
  text-transform: uppercase;
}

.handle {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.btn-sm {
  background: var(--accent);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
}

.btn-link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}

.btn-link:hover {
  color: var(--link);
  text-decoration: underline;
}

/* --- Footer --- */

.site-footer {
  max-width: 1200px;
  margin: 4rem auto 2rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* --- Responsive Layout --- */

@media (max-width: 600px) {
  .grid-feed {
    grid-template-columns: 1fr;
  }
  
  .site-header h1 {
    font-size: 1.3rem;
  }
}
/* --- Spotlight Page Specifics --- */

.spotlight-container {
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
  text-transform: capitalize;
}

.breadcrumb a { color: var(--muted); }

.spotlight-focus-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.category-badge.big {
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

.spotlight-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: #fff;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.author-name {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.text-content {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap; /* Keeps line breaks from the original post */
  margin-bottom: 3rem;
}

.spotlight-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
}

.btn-secondary {
  color: var(--muted);
  font-size: 0.95rem;
}

.more-context {
  margin-top: 4rem;
  padding: 2rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.more-context h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

/* Mobile Fixes */
@media (max-width: 600px) {
  .spotlight-focus-card {
    padding: 1.5rem;
  }
  .spotlight-title {
    font-size: 1.8rem;
  }
  .spotlight-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary {
    text-align: center;
  }
}
/* --- About Page Styles --- */

.about-container {
  max-width: 900px;
  margin: 0 auto;
}

.about-hero {
  text-align: center;
  padding: 4rem 0;
}

.about-hero h1 {
  font-size: 3rem;
  margin: 1rem 0;
  line-height: 1.1;
}

.lead-text {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

.about-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.highlight-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-num {
  font-weight: 800;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.about-footer-info {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.info-card {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.back-home {
  text-align: center;
  margin-top: 4rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-hero h1 {
    font-size: 2.2rem;
  }
}
/* --- Bot Instruction Card --- */

.bot-instruction-card {
  background: linear-gradient(145deg, #1a1a1a, #111);
  border: 1px dashed var(--accent);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.bot-instruction-card h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.code-snippet {
  background: #000;
  color: var(--accent);
  padding: 1rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.2rem;
  display: inline-block;
  margin-top: 1rem;
  border: 1px solid var(--border);
}

/* Adjusting the step layout for better alignment */
.step div {
  display: flex;
  flex-direction: column;
}

.step strong {
  color: var(--text);
  font-size: 1.05rem;
}

.step p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
