*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fff;
  --bg-2: #f8f8f8;
  --text: #111;
  --text-2: #444;
  --text-3: #888;
  --border: #e5e5e5;
  --accent: #2563eb;
  --radius: 8px;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Nav */
nav {
  padding: 16px 40px;
  border-bottom: 1px solid var(--border);
}

nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
}

nav a:hover { color: var(--text); }

/* Main */
main {
  max-width: 860px;
  margin: auto;
  padding: 0 40px 80px;
}

/* Page header */
.page-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-2);
  font-size: 15px;
}

/* Section */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

/* Base card */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

/* Course Card */
.badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.card-course h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.card-course p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.lesson-count {
  font-size: 12px;
  color: var(--text-3);
}

.cta-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cta-link:hover .arrow { transform: translateX(3px); }

.arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

/* Blog Card */
.blog-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date {
  font-size: 12px;
  color: var(--text-3);
}

.tag {
  font-size: 11px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
}

.card-blog h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.excerpt {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.read-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
}

.read-more:hover { text-decoration: underline; }

/* Profile Card */
.card-profile {
  align-items: center;
  text-align: center;
  gap: 12px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 16px;
  font-weight: 600;
}

.role {
  font-size: 13px;
  color: var(--text-3);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.social-link {
  color: var(--text-3);
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
}

.social-link:hover { color: var(--text); }

/* Skeleton Section */
.skeleton-section {
  margin-bottom: 60px;
}

.skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel {
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skel-badge  { height: 18px; width: 48px; border-radius: 4px; }
.skel-title  { height: 20px; width: 85%; }
.skel-body   { height: 13px; width: 100%; }
.skel-body-short { width: 70%; }

.skel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.skel-meta { height: 12px; width: 70px; }
.skel-cta  { height: 12px; width: 90px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Prompt section */
.prompt-section {
  margin-bottom: 40px;
}

.prompt-blocks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.prompt-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.prompt-label {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.prompt-block pre {
  padding: 16px;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre-wrap;
}

.prompt-block code {
  font-family: inherit;
}

/* Mobile */
@media (max-width: 640px) {
  nav, main { padding-left: 20px; padding-right: 20px; }
  .cards-grid { grid-template-columns: 1fr; }
  .page-header { padding-top: 32px; }
}
