/* ── Animations ──────────────────────────────── */

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

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

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(21, 120, 120, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(21, 120, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 120, 120, 0); }
}

/* ── Site nav ───────────────────────────────── */

.site-nav {
  background: linear-gradient(120deg, #155757, #157878);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: navSlideDown 0.4s ease both;
}

.site-nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.nav-brand:hover {
  opacity: 1;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: rgba(255,255,255,0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  border-radius: 2px;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.4);
  animation: pulse-ring 2.5s ease-out 1.5s 3;
}

.nav-cta:hover {
  background: rgba(255,255,255,0.28) !important;
  color: #fff !important;
}

.nav-cta::after {
  display: none;
}

/* ── Nav GitHub auth ─────────────────────────── */

.nav-github-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-github-signin::after { display: none !important; }

.nav-github-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
}

.nav-github-avatar {
  border-radius: 50%;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: cover;
}

.nav-github-username {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
}

.nav-github-signout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}

.nav-github-signout:hover { color: rgba(255,255,255,0.9); }

/* ── Match header + nav colour exactly ───────── */

.page-header {
  background-color: #155757;
  background-image: linear-gradient(120deg, #155757, #157878);
  padding: 2rem 4rem;
}

/* ── Page content entrance ───────────────────── */

.main-content {
  animation: fadeUp 0.45s ease 0.1s both;
}

.page-header {
  animation: fadeUp 0.4s ease both;
}

/* ── Post page ──────────────────────────────── */

.post-cover {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: block;
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: #155757;
  line-height: 1.3;
}

.post-meta {
  font-size: 0.82rem;
  color: #767676;
  margin: 0;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  color: #155757;
  margin-top: 2rem;
}

.post-content p {
  line-height: 1.75;
  color: #333;
}

.post-content code {
  background: #f0f4f4;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.87em;
}

.post-content pre {
  background: #1b2333;
  color: #e0e6f0;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85em;
}

.post-content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.25rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
  line-height: 1.75;
  color: #333;
}

.post-content blockquote {
  border-left: 4px solid #157878;
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: #555;
  background: #f0f9f9;
  border-radius: 0 6px 6px 0;
}

.post-back {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e4e8;
}

.post-back a {
  color: #157878;
  text-decoration: none;
  font-size: 0.9rem;
}

.post-back a:hover {
  text-decoration: underline;
}

/* ── Recent posts (bottom of post page) ─────── */

.recent-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e8f0f0;
}

.recent-posts-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin: 0 0 1.25rem 0;
}

.post-card-placeholder {
  background: linear-gradient(135deg, #e8f4f4, #d0e8e8);
  flex-shrink: 0;
  width: 160px;
  height: 160px;
}

/* ── Home post list ─────────────────────────── */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.post-card {
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  animation: fadeUp 0.4s ease both;
}

.post-card:nth-child(1) { animation-delay: 0.15s; }
.post-card:nth-child(2) { animation-delay: 0.25s; }
.post-card:nth-child(3) { animation-delay: 0.35s; }
.post-card:nth-child(4) { animation-delay: 0.45s; }
.post-card:nth-child(5) { animation-delay: 0.55s; }

.post-card:hover {
  box-shadow: 0 6px 24px rgba(21,120,120,0.13);
  transform: translateY(-2px);
  border-color: #b8d8d8;
  text-decoration: none;
}

.post-card-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.post-card-body {
  padding: 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.post-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: #157878;
  line-height: 1.4;
}

.post-card-desc {
  font-size: 0.82rem;
  color: #444;
  margin: 0 0 0.4rem 0;
  line-height: 1.5;
}

.post-card-date {
  font-size: 0.75rem;
  color: #767676;
  margin: 0;
}

/* ── Course hero banner ──────────────────────── */

.course-hero {
  background: linear-gradient(135deg, #0d3d3d 0%, #145f5f 50%, #1a7a6e 100%);
  padding: 3rem 2rem;
  text-align: center;
  animation: fadeUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}

/* subtle radial glow for depth */
.course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 120%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.course-hero-inner {
  max-width: 52rem;
  margin: 0 auto;
  position: relative;
}

.course-hero-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 0.2rem 0.85rem;
  margin: 0 0 1rem;
}

.course-hero .course-hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 0.85rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.course-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin: 0 auto;
  max-width: 44rem;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .course-hero { padding: 2rem 1.25rem; }
  .course-hero .course-hero-title { font-size: 1.6rem; }
}

@media (max-width: 540px) {
  .course-hero .course-hero-title { font-size: 1.35rem; }
}

/* ── Course page ─────────────────────────────── */

.course-stats-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #f6fafa;
  border: 1px solid #d0e8e8;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.course-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 100px;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #155757;
}

.stat-label {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.btn-enroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #155757, #157878);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 2px 8px rgba(21,120,120,0.3);
  white-space: normal;
  word-break: keep-all;
}

.btn-enroll:hover {
  background: #0f5f5f;
}

.btn-enroll-lg {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 8px;
}

.btn-enroll-price {
  font-weight: 700;
}

.btn-enroll-original {
  font-size: 0.78em;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  margin-top: 0.1rem;
  text-decoration: line-through;
}

.course-stat--returning {
  flex: 0 0 auto;
  min-width: auto;
}

.btn-already-student {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #155757;
  text-decoration: none;
  border: 1.5px solid #a8d8d8;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #e8f7f7 0%, #d4f0f0 100%);
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  box-shadow: 0 1px 3px rgba(21,120,120,0.10);
}

.btn-already-student svg {
  color: #157878;
  flex-shrink: 0;
}

.btn-already-student:hover {
  background: linear-gradient(135deg, #d4f0f0 0%, #bde8e8 100%);
  border-color: #157878;
  box-shadow: 0 2px 8px rgba(21,120,120,0.18);
  transform: translateY(-1px);
  text-decoration: none;
  color: #0f4f4f;
}

.course-section {
  margin-bottom: 3rem;
}

.course-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #155757;
  border-bottom: 2px solid #d0e8e8;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.course-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.pillar {
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  background: #fff;
}

.pillar-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.pillar h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.4rem 0;
}

.pillar p {
  font-size: 0.82rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.course-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.course-body table th {
  background: #f0f9f9;
  color: #155757;
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 2px solid #d0e8e8;
}

.course-body table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  vertical-align: top;
}

.course-body table tr:last-child td {
  border-bottom: none;
}

.course-body table tr:hover td {
  background: #f9fefe;
}

.capstone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.capstone-item {
  background: #f0f9f9;
  border: 1px solid #d0e8e8;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #155757;
  text-align: center;
}

.course-cta-section {
  text-align: center;
  background: #f6fafa;
  border: 1px solid #d0e8e8;
  border-radius: 12px;
  padding: 2.5rem 2rem;
}

.course-cta-section h2 {
  border: none;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.course-cta-section p {
  color: #555;
  margin-bottom: 1.5rem;
}

/* ── About page ──────────────────────────────── */

.about-page {
  max-width: 720px;
}

.about-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #d0e8e8;
}

.about-hero-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #d0e8e8;
  box-shadow: 0 4px 16px rgba(21,120,120,0.12);
}

@media (max-width: 500px) {
  .about-hero { flex-direction: column; align-items: center; text-align: center; }
  .about-hero-text .about-linkedin { justify-content: center; }
}

.about-name {
  font-size: 2rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.25rem 0;
}

.about-title {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin: 0 0 0.85rem 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.about-summary {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.75;
  margin: 0 0 1.25rem 0;
  max-width: 600px;
}

.about-linkedin {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0a66c2;
  text-decoration: none;
  border: 1px solid #0a66c2;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.about-linkedin:hover {
  background: #0a66c2;
  color: #fff;
  text-decoration: none;
}

.about-section {
  margin-bottom: 2.5rem;
}

.about-section h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin: 0 0 1rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e8f0f0;
}

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: #f0f9f9;
  border: 1px solid #c8e4e4;
  color: #155757;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f4f4;
  align-items: flex-start;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  flex-shrink: 0;
  width: 150px;
}

.timeline-period {
  font-size: 0.78rem;
  color: #767676;
  font-weight: 500;
}

.timeline-body {
  flex: 1;
}

.timeline-role {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.15rem 0;
}

.timeline-company {
  font-size: 0.85rem;
  color: #157878;
  font-weight: 600;
  margin: 0;
}

.about-edu {
  padding: 0.25rem 0;
}

.edu-degree {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.2rem 0;
}

.edu-school {
  font-size: 0.82rem;
  color: #777;
  margin: 0;
}

/* ── Curriculum grid ─────────────────────────── */

.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.curriculum-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid #e8f0f0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.curriculum-item:hover {
  border-color: #b0d8d8;
  box-shadow: 0 2px 8px rgba(21,120,120,0.08);
}

.curriculum-item--highlight {
  border-color: #b0d8d8;
  background: #f6fafa;
}

.week-badge {
  flex-shrink: 0;
  background: #e8f4f4;
  color: #155757;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 52px;
  text-align: center;
}

.week-badge--ai {
  background: #155757;
  color: #fff;
}

.curriculum-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.curriculum-info strong {
  font-size: 0.875rem;
  color: #1a1a1a;
  line-height: 1.3;
}

.curriculum-info span {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.4;
}

/* ── Newsletter page ─────────────────────────── */

.newsletter-page {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.newsletter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  margin: 0 0 0.75rem 0;
}

.newsletter-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #155757;
  line-height: 1.25;
  margin: 0 0 0.85rem 0;
}

.newsletter-sub {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

.newsletter-card {
  background: #fff;
  border: 1px solid #d0e8e8;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(21,120,120,0.07);
}

.newsletter-perks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e8f0f0;
}

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

.perk-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.perk strong {
  display: block;
  font-size: 0.9rem;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
}

.perk p {
  font-size: 0.83rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.newsletter-input-row {
  display: flex;
  gap: 0.65rem;
}

.newsletter-email-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid #c8e4e4;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #f9fefe;
}

.newsletter-email-input:focus {
  border-color: #157878;
  box-shadow: 0 0 0 3px rgba(21,120,120,0.12);
  background: #fff;
}

.newsletter-submit {
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}

.newsletter-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.newsletter-privacy {
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin: 0.85rem 0 0 0;
}

/* ── Newsletter success popup ────────────────── */

.nl-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.nl-popup-overlay.nl-popup--visible {
  display: flex;
  animation: fadeUp 0.3s ease both;
}

.nl-popup-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.nl-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
}

.nl-check svg {
  width: 100%;
  height: 100%;
}

.nl-check-circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawCircle 0.5s ease 0.1s forwards;
}

.nl-check-tick {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawTick 0.35s ease 0.55s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawTick {
  to { stroke-dashoffset: 0; }
}

.nl-popup-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.nl-popup-card p {
  font-size: 0.88rem;
  color: #666;
  margin: 0 0 1.5rem 0;
}

.nl-popup-close {
  background: #22c55e;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.nl-popup-close:hover {
  background: #16a34a;
}

/* ── Footer ──────────────────────────────────── */

.site-footer {
  background: linear-gradient(120deg, #155757, #157878);
  color: rgba(255,255,255,0.85);
  margin-top: 4rem;
}

.site-footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-brand {
  flex: 1;
  min-width: 200px;
}

.footer-logo {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.footer-logo:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}

.footer-tagline {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.footer-social:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-nav-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.85rem 0;
}

.footer-nav-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-nav-col ul li {
  margin: 0;
}

.footer-nav-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  padding: 1rem 2rem;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

/* ── Post Interactions ────────────────────────── */

.post-interactions {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e1e4e8;
  align-items: center;
  flex-wrap: wrap;
}

.interaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f6fafa;
  border: 1px solid #d0e8e8;
  color: #155757;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.interaction-btn:hover {
  background: #e8f4f4;
  border-color: #b0d8d8;
  transform: translateY(-1px);
}

.interaction-btn.active {
  background: #157878;
  color: #fff;
  border-color: #157878;
}

.interaction-icon {
  font-size: 1.1rem;
}

/* ── Comment Section (Giscus) ───────────────── */
.comment-section {
  display: block;
  margin-top: 1.5rem;
  background: #fdfdfd;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 1.5rem;
  animation: fadeUp 0.3s ease;
}

.comment-section.active {
  display: block;
}

.comment-section h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #155757;
  margin-bottom: 1rem;
}

/* ── Past Issues ────────────────────────────── */
.newsletter-issues {
  margin-top: 3rem;
  background: #fff;
  border: 1px solid #d0e8e8;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(21,120,120,0.07);
}

.newsletter-issues h2 {
  font-size: 1.5rem;
  color: #155757;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f0f4f4;
  padding-bottom: 0.75rem;
}

.issues-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issues-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f9fefe;
  border: 1px solid #e8f4f4;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.issues-list li:hover {
  background: #fff;
  border-color: #b0d8d8;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(21,120,120,0.05);
}

.issue-date {
  font-size: 0.8rem;
  color: #777;
  font-weight: 600;
  min-width: 90px;
}

.issue-link {
  font-weight: 600;
  color: #157878;
  text-decoration: none;
  font-size: 0.95rem;
}

.issue-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL UX IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

/* Global box sizing (belt-and-suspenders in case theme doesn't set it) */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal overflow on all viewports */
body {
  overflow-x: hidden;
}

/* Responsive images – never overflow their container */
img {
  max-width: 100%;
  height: auto;
}

/* Better focus rings for keyboard navigation */
:focus-visible {
  outline: 3px solid #22c55e;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip-to-content link (already in HTML, style it properly) */
#skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #155757;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
#skip-to-content:focus {
  top: 0;
}

/* Ensure minimum tap target size for interactive elements */
button,
[role="button"],
.interaction-btn,
.btn-enroll,
.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Override min-height for specific layout-breaking elements */
.nav-links li {
  min-height: unset;
}
.nav-links a {
  display: inline-flex;
  min-height: 36px;
}

/* Reading-width constraint for long prose (improves readability) */
.post-content p,
.post-content li {
  max-width: 70ch;
}

/* Lesson layout: break out of main-content padding/max-width constraints */
.main-content:has(.lesson-wrapper) {
  padding: 0;
  max-width: none;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE HAMBURGER MENU
   ═══════════════════════════════════════════════════════════════ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  transition: background 0.2s;
  min-height: unset;
}

.nav-hamburger:hover {
  background: rgba(255,255,255,0.12);
}

.nav-hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* (overlay removed — dropdown approach needs no overlay) */

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet: ≤ 768px ──────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Nav: hamburger + dropdown ──────────────── */
  .nav-hamburger {
    display: flex;
  }

  .site-nav {
    position: sticky; /* keep sticky so dropdown is contained */
  }

  .site-nav-inner {
    padding: 0 1rem;
    height: 56px;
  }

  .nav-brand {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
  }

  /* Dropdown: absolutely positioned below the nav bar */
  .nav-links {
    position: absolute;
    top: 100%;   /* flush below the nav bar */
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    background: #0f4848;
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    z-index: 10; /* only needs to beat page content, not escape stacking context */
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a,
  .nav-github-signin,
  .nav-github-user {
    display: flex !important;
    align-items: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    color: #fff !important;
    border-radius: 0;
    min-height: 54px;
    width: 100%;
    justify-content: flex-start;
    background: transparent;
  }

  .nav-links a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
  }

  .nav-links a::after {
    display: none;
  }

  /* Courses CTA: highlight within dropdown */
  .nav-cta {
    background: rgba(255,255,255,0.12) !important;
    margin: 0.5rem 1rem;
    border-radius: 8px !important;
    min-height: 48px;
    justify-content: center;
    width: calc(100% - 2rem) !important;
  }

  .nav-cta:hover {
    background: rgba(255,255,255,0.22) !important;
  }

  .nav-github-user {
    gap: 0.6rem;
  }

  /* Page header: reduce padding */
  .page-header {
    padding: 1.75rem 1.5rem;
  }

  .page-header .project-name {
    font-size: 1.6rem;
  }

  .page-header .project-tagline {
    font-size: 0.9rem;
  }

  /* Main content padding */
  .main-content {
    padding: 2rem 1.25rem;
  }

  /* About page: stack two columns */
  .about-cols {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-name {
    font-size: 1.6rem;
  }

  /* Course stats bar: tighter gap on tablets */
  .course-stats-bar {
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  /* Footer: tighten gaps */
  .site-footer-inner {
    gap: 2rem;
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .footer-nav {
    gap: 2rem;
  }

  /* Newsletter: full width */
  .newsletter-page {
    padding: 0 0.5rem;
  }

  .newsletter-heading {
    font-size: 1.6rem;
  }

  /* ── Post cards: full-bleed image card on mobile/tablet ─── */
  .post-card {
    flex-direction: column;
    align-items: stretch;
  }

  .post-card-image,
  .post-card-placeholder {
    width: 100%;
    height: 200px;
    flex-shrink: 0;
  }

  .post-card-body {
    padding: 1rem 1.1rem 1.15rem;
    justify-content: flex-start;
  }

  .post-card-title {
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: 0.4rem;
  }

  .post-card-desc {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.6rem;
  }
}

/* ── Mobile: ≤ 540px ──────────────────────────────────────────── */
@media (max-width: 540px) {

  /* Page header */
  .page-header {
    padding: 1.5rem 1rem;
  }

  .page-header .project-name {
    font-size: 1.35rem;
  }

  .page-header .project-tagline {
    font-size: 0.82rem;
  }

  /* Main content */
  .main-content {
    padding: 1.5rem 1rem;
  }

  /* Post title */
  .post-title {
    font-size: 1.5rem;
  }

  /* About */
  .about-name {
    font-size: 1.4rem;
  }

  .about-summary {
    font-size: 0.9rem;
  }

  /* Timeline: collapse meta section */
  .timeline-item {
    flex-direction: column;
    gap: 0.3rem;
  }

  .timeline-meta {
    width: auto;
  }

  /* Newsletter: stack input row vertically */
  .newsletter-input-row {
    flex-direction: column;
  }

  .newsletter-submit {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .newsletter-card {
    padding: 1.5rem 1.25rem;
  }

  .newsletter-heading {
    font-size: 1.4rem;
  }

  /* Course stats bar: flex-based 2-up layout */
  .course-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem;
  }

  /* Info stats: 2 per row */
  .course-stat {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }

  /* Buy button + Already student: always full width */
  .course-stat--cta,
  .course-stat--returning {
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Buy button: full width, prominent */
  .course-stat--cta .btn-enroll {
    display: flex;
    width: 100%;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }

  /* Footer: single column */
  .site-footer-inner {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem 1.25rem;
  }

  .footer-brand {
    min-width: unset;
  }

  .footer-nav {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .footer-bottom {
    padding: 1rem;
  }

  /* Post interactions: stack buttons */
  .post-interactions {
    gap: 0.65rem;
  }

  .interaction-btn {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
  }

  /* Issues list: stack date and link */
  .issues-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .issue-date {
    min-width: unset;
  }

  /* Curriculum grid: single column */
  .curriculum-grid {
    grid-template-columns: 1fr;
  }

  /* Course pillars: single column */
  .course-pillars {
    grid-template-columns: 1fr;
  }

  /* Course CTA section */
  .course-cta-section {
    padding: 1.75rem 1.25rem;
  }

  /* Capstone grid: single column */
  .capstone-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Inline subscribe: stack form elements vertically */
  .inline-subscribe {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-subscribe__form {
    flex-direction: column;
    flex-shrink: 1;
  }

  .inline-subscribe__form input[type="email"] {
    width: 100%;
  }

  .inline-subscribe__form button {
    width: 100%;
  }
}

/* ── Small phones: ≤ 380px ────────────────────────────────────── */
@media (max-width: 380px) {
  .page-header .project-name {
    font-size: 1.2rem;
  }

  .about-name {
    font-size: 1.25rem;
  }

  .newsletter-heading {
    font-size: 1.2rem;
  }

  .capstone-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    width: 100vw;
  }

  /* Post: tighter title and shorter hero image */
  .post-title {
    font-size: 1.3rem;
  }

  .post-cover {
    max-height: 200px;
  }

  /* Main content: minimal edge padding */
  .main-content {
    padding: 1.25rem 0.85rem;
  }
}

/* ─── Hover effects only on devices that support hover ─────────── */
/* Avoids sticky :hover states on touch devices */
@media (hover: none) {
  .post-card:hover {
    transform: none;
    box-shadow: none;
  }

  .issues-list li:hover {
    transform: none;
  }

  .btn-already-student:hover {
    transform: none;
  }

  .interaction-btn:hover {
    transform: none;
  }
}

/* ── Print styles ─────────────────────────────────────────────── */
@media print {
  .site-nav,
  .site-footer,
  .post-interactions,
  .comment-section,
  .recent-posts,
  .nav-hamburger {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ── Active nav link ────────────────────────── */

.nav-links a.is-active {
  color: #fff;
  background: rgba(255,255,255,0.18);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

/* ── Post cover: prevent layout shift ─────── */

.post-cover {
  aspect-ratio: 16 / 9;
}

/* ── Post meta: category + reading time ───── */

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #999;
  margin: 0;
}

.post-cat-badge {
  display: inline-block;
  background: #e8f4f4;
  color: #155757;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #c8e4e4;
  transition: background 0.15s;
}

.post-cat-badge:hover {
  background: #d0ecec;
  text-decoration: none;
}

.post-meta-date,
.post-meta-read {
  color: #767676;
}

.post-meta-read::before {
  content: '·';
  margin-right: 0.5rem;
}

/* ── Post card: hover title tint */

.post-card:hover .post-card-title {
  color: #0f5f5f;
}

.post-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.post-card-cat {
  display: inline-block;
  background: #e8f4f4;
  color: #155757;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #c8e4e4;
}

.post-card-read {
  font-size: 0.72rem;
  color: #aaa;
}

.post-card-read::before {
  content: '·';
  margin-right: 0.35rem;
}

/* ── Homepage intro hook ─────────────────── */

.home-intro {
  margin-bottom: 0.5rem;
}

.home-intro__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  margin: 0 0 0.4rem;
}

.home-intro__text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
  max-width: 600px;
}

/* ── Blog category filters ───────────────── */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
}

.blog-filter-btn {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: #444;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.blog-filter-btn:hover {
  background: #e8e8e8;
}

.blog-filter-btn.active {
  background: #157878;
  color: #fff;
  border-color: #157878;
}

/* ── Search page ─────────────────────────── */

.search-input-wrap {
  position: relative;
  margin-bottom: 1.75rem;
}

.search-input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #1a1a1a;
}

.search-input:focus {
  border-color: #157878;
  box-shadow: 0 0 0 3px rgba(21,120,120,0.1);
}

.search-empty {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── Contrast fix: meta / date text ─────── */

.post-meta-date,
.post-meta-read,
.post-card-date,
.post-card-read,
.search-empty {
  color: #767676;
}

/* ── Search nav label ────────────────────── */

.nav-search-label {
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  .nav-search-label { display: none; }
}

/* ── Author card ─────────────────────────── */

.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #d0e8e8;
  border-radius: 14px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 12px rgba(21,120,120,0.06);
}

.author-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 2px solid #d0e8e8;
}

.author-card__body {
  flex: 1;
}

.author-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  margin: 0 0 0.2rem;
}

.author-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.3rem;
}

.author-card__bio {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 0.65rem;
}

.author-card__link {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0a66c2;
  text-decoration: none;
}

.author-card__link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .author-card { flex-direction: column; align-items: center; text-align: center; }
  .author-card__link { justify-content: center; }
}

/* ── Post course CTA ─────────────────────── */

.post-course-cta {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f0fafa 0%, #e8f4f4 100%);
  border: 1px solid #c8e4e4;
  border-left: 4px solid #157878;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.post-course-cta__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.post-course-cta__body {
  flex: 1;
}

.post-course-cta__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  margin: 0 0 0.2rem;
}

.post-course-cta__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.3rem;
}

.post-course-cta__desc {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}

.post-course-cta__link {
  flex-shrink: 0;
  align-self: center;
  display: inline-block;
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}

.post-course-cta__link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

@media (max-width: 560px) {
  .post-course-cta { flex-direction: column; }
  .post-course-cta__link { align-self: flex-start; }
}

/* ── Mid-post inline subscribe ───────────── */

.inline-subscribe {
  background: #f6fafa;
  border: 1px solid #d0e8e8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.inline-subscribe__text {
  font-size: 0.88rem;
  color: #444;
  margin: 0;
  flex: 1;
  min-width: 180px;
}

.inline-subscribe__form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.inline-subscribe__form input[type="email"] {
  padding: 0.5rem 0.85rem;
  border: 1px solid #c8e4e4;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
  outline: none;
  width: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.inline-subscribe__form input[type="email"]:focus {
  border-color: #157878;
  box-shadow: 0 0 0 3px rgba(21,120,120,0.1);
}

.inline-subscribe__form button {
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.inline-subscribe__form button:hover { opacity: 0.9; }

.inline-subscribe__done {
  font-size: 0.88rem;
  font-weight: 600;
  color: #157878;
  margin: 0;
}

/* ── Homepage hero ───────────────────────── */

.main-content .home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #e8f0f0;
  margin-bottom: 0.5rem;
}

.home-hero__text {
  flex: 1;
}

.home-hero__greeting {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  margin: 0 0 0.5rem;
}

.home-hero__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #155757;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.home-hero__bio {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.7;
  margin: 0 0 0.85rem;
  max-width: 520px;
}

.home-hero__creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.home-hero__cred {
  font-size: 0.72rem;
  font-weight: 700;
  background: #e8f4f4;
  color: #155757;
  border: 1px solid #c8e4e4;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.home-hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-hero__cta-primary {
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.home-hero__cta-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.home-hero__cta-secondary {
  font-size: 0.88rem;
  font-weight: 600;
  color: #155757;
  padding: 0.65rem 1.3rem;
  border: 1.5px solid #c8e4e4;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.home-hero__cta-secondary:hover {
  background: #f0fafa;
  border-color: #157878;
  text-decoration: none;
  color: #155757;
}

.home-hero__photo-wrap {
  flex-shrink: 0;
}

.home-hero__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #d0e8e8;
  box-shadow: 0 4px 20px rgba(21,120,120,0.15);
  display: block;
}

@media (max-width: 600px) {
  .main-content .home-hero { flex-direction: column-reverse; align-items: flex-start; padding-top: 1.5rem; }
  .home-hero__photo { width: 80px; height: 80px; }
  .home-hero__name { font-size: 1.25rem; }
}

/* ── Homepage posts section ──────────────── */

.home-posts-section {
  margin-top: 2rem;
}

.home-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.home-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin: 0;
}

.home-section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #157878;
  text-decoration: none;
}

.home-section-link:hover { text-decoration: underline; }

/* ── Homepage course teaser ──────────────── */

.home-course-card {
  background: linear-gradient(135deg, #155757 0%, #157878 100%);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-course-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.home-course-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.home-course-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.home-course-card__desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 520px;
}

.home-course-card__link {
  display: inline-block;
  background: #fff;
  color: #155757;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.home-course-card__link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  text-decoration: none;
  color: #155757;
}

/* ── Course waitlist form ─────────────────── */

.course-waitlist {
  background: #fff;
  border: 1px solid #d0e8e8;
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 24px rgba(21,120,120,0.07);
  text-align: center;
}

.course-waitlist__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #157878;
  background: #e8f4f4;
  border: 1px solid #c8e4e4;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin: 0 0 0.75rem;
}

.course-waitlist__heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.5rem;
}

.course-waitlist__sub {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.course-waitlist__count {
  font-weight: 700;
  color: #157878;
}

.course-waitlist__row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.course-waitlist__input {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 0.7rem 1rem;
  border: 1px solid #c8e4e4;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #f9fefe;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.course-waitlist__input:focus {
  border-color: #157878;
  box-shadow: 0 0 0 3px rgba(21,120,120,0.12);
  background: #fff;
}

.course-waitlist__btn {
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}

.course-waitlist__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.course-waitlist__note {
  font-size: 0.75rem;
  color: #aaa;
  margin: 0.75rem 0 0;
}

.course-waitlist__thanks {
  font-size: 0.95rem;
  font-weight: 600;
  color: #157878;
  margin: 0.5rem 0 0;
}

/* ── Instructor card ─────────────────────── */

.instructor-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 1.5rem;
}

.instructor-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #d0e8e8;
}

.instructor-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.15rem;
}

.instructor-card__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 0 0 0.6rem;
}

.instructor-card__bio {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.instructor-card__certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.instructor-cert {
  font-size: 0.72rem;
  font-weight: 700;
  background: #e8f4f4;
  color: #155757;
  border: 1px solid #c8e4e4;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

@media (max-width: 500px) {
  .instructor-card { flex-direction: column; align-items: center; text-align: center; }
  .instructor-card__certs { justify-content: center; }
}

/* ── 404 page ────────────────────────────── */

.error-404 {
  text-align: center;
  padding: 3rem 1rem;
}

.error-404__code {
  font-size: 6rem;
  font-weight: 700;
  color: #d0e8e8;
  line-height: 1;
  margin: 0 0 0.25rem;
}

.error-404__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #155757;
  margin: 0 0 0.5rem;
}

.error-404__sub {
  color: #767676;
  margin: 0 0 2rem;
}

.error-404__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.error-404__btn-primary {
  background: linear-gradient(120deg, #155757, #157878);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.error-404__btn-primary:hover { opacity: 0.9; text-decoration: none; color: #fff; }

.error-404__btn-secondary {
  font-size: 0.9rem;
  font-weight: 600;
  color: #155757;
  padding: 0.65rem 1.4rem;
  border: 1.5px solid #c8e4e4;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.error-404__btn-secondary:hover { background: #f0fafa; text-decoration: none; color: #155757; }

.error-404__links p {
  font-size: 0.85rem;
  color: #767676;
  margin: 0 0 0.4rem;
}

.error-404__links ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-404__links a {
  font-size: 0.85rem;
  color: #157878;
  text-decoration: none;
}

.error-404__links a:hover { text-decoration: underline; }

/* ── Dark mode toggle button ──────────────────── */

.nav-theme-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.nav-theme-toggle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.theme-icon-sun line {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── Dark theme ───────────────────────────────── */

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background-color: #0d1117;
  color: #e6edf3;
}

/* Main content text */
[data-theme="dark"] .main-content {
  color: #e6edf3;
}

[data-theme="dark"] .main-content h1,
[data-theme="dark"] .main-content h2,
[data-theme="dark"] .main-content h3,
[data-theme="dark"] .main-content h4,
[data-theme="dark"] .main-content h5,
[data-theme="dark"] .main-content h6 {
  color: #7dd3d0;
}

[data-theme="dark"] .main-content p,
[data-theme="dark"] .main-content li {
  color: #cdd9e5;
}

[data-theme="dark"] .main-content a {
  color: #4db6ac;
}

[data-theme="dark"] .main-content a:hover {
  color: #80cbc4;
}

/* Post page */
[data-theme="dark"] .post-title {
  color: #7dd3d0;
}

[data-theme="dark"] .post-meta {
  color: #8b949e;
}

[data-theme="dark"] .post-content h1,
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3 {
  color: #7dd3d0;
}

[data-theme="dark"] .post-content p,
[data-theme="dark"] .post-content ul,
[data-theme="dark"] .post-content ol {
  color: #cdd9e5;
}

[data-theme="dark"] .post-content code {
  background: #1c2128;
  color: #e6edf3;
}

[data-theme="dark"] .post-content blockquote {
  background: #0f2830;
  border-left-color: #4db6ac;
  color: #8b949e;
}

[data-theme="dark"] .post-back {
  border-top-color: #30363d;
}

[data-theme="dark"] .post-back a {
  color: #4db6ac;
}

/* Post cards */
[data-theme="dark"] .post-card {
  border-color: #30363d;
  background: #161b22;
  color: #e6edf3;
}

[data-theme="dark"] .post-card:hover {
  border-color: #4db6ac;
  box-shadow: 0 6px 24px rgba(77,182,172,0.15);
}

[data-theme="dark"] .post-card-title {
  color: #4db6ac;
}

[data-theme="dark"] .post-card-desc {
  color: #8b949e;
}

[data-theme="dark"] .post-card-date {
  color: #6e7681;
}

/* Recent posts */
[data-theme="dark"] .recent-posts {
  border-top-color: #21262d;
}

[data-theme="dark"] .recent-posts-title {
  color: #6e7681;
}

/* Course hero: keep white text in dark mode */
[data-theme="dark"] .course-hero .course-hero-title {
  color: #fff !important;
}

/* Course stats bar */
[data-theme="dark"] .course-stats-bar {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .stat-value {
  color: #7dd3d0;
}

[data-theme="dark"] .stat-label {
  color: #6e7681;
}

/* Instructor card */
[data-theme="dark"] .instructor-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .instructor-card__name {
  color: #7dd3d0;
}

[data-theme="dark"] .instructor-card__title {
  color: #6e7681;
}

[data-theme="dark"] .instructor-card__bio {
  color: #8b949e;
}

[data-theme="dark"] .instructor-cert {
  background: #0f2830;
  color: #4db6ac;
  border-color: #1a3d3d;
}

/* Already student button */
[data-theme="dark"] .btn-already-student {
  background: linear-gradient(135deg, #0f2830 0%, #1a3d3d 100%);
  border-color: #2a5555;
  color: #4db6ac;
}

[data-theme="dark"] .btn-already-student:hover {
  background: linear-gradient(135deg, #1a3d3d 0%, #204f4f 100%);
  border-color: #4db6ac;
  color: #7dd3d0;
}

/* Forms / inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}

[data-theme="dark"] .course-waitlist__input {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}

[data-theme="dark"] .course-waitlist__input:focus {
  background: #161b22;
  border-color: #4db6ac;
}

/* 404 page */
[data-theme="dark"] .error-404__code {
  color: #1a3d3d;
}

[data-theme="dark"] .error-404__heading {
  color: #7dd3d0;
}

[data-theme="dark"] .error-404__sub {
  color: #8b949e;
}

[data-theme="dark"] .error-404__btn-secondary {
  color: #4db6ac;
  border-color: #2a5555;
}

[data-theme="dark"] .error-404__btn-secondary:hover {
  background: #0f2830;
  color: #7dd3d0;
}

[data-theme="dark"] .error-404__links a {
  color: #4db6ac;
}

/* Jekyll base theme overrides */
[data-theme="dark"] .main-content table th,
[data-theme="dark"] .main-content table td {
  border-color: #30363d;
  color: #cdd9e5;
}

[data-theme="dark"] .main-content table tr:nth-child(odd) {
  background: #161b22;
}

[data-theme="dark"] .main-content table tr:nth-child(even) {
  background: #0d1117;
}

[data-theme="dark"] hr {
  border-color: #30363d;
}

/* ── Post interactions ────────────────────────────────────────── */

[data-theme="dark"] .post-interactions {
  border-top-color: #30363d;
}

[data-theme="dark"] .interaction-btn {
  background: #1c2128;
  border-color: #30363d;
  color: #7dd3d0;
}

[data-theme="dark"] .interaction-btn:hover {
  background: #0f2830;
  border-color: #4db6ac;
}

/* ── 16-Week Bootcamp CTA ────────────────────────────────────── */

[data-theme="dark"] .post-course-cta {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .post-course-cta__label { color: #6e7681; }
[data-theme="dark"] .post-course-cta__title { color: #7dd3d0; }
[data-theme="dark"] .post-course-cta__desc  { color: #8b949e; }

/* ── Author card (Written by) ─────────────────────────────────── */

[data-theme="dark"] .author-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .author-card__label { color: #6e7681; }
[data-theme="dark"] .author-card__name  { color: #7dd3d0; }
[data-theme="dark"] .author-card__bio   { color: #8b949e; }
[data-theme="dark"] .author-card__link  { color: #4db6ac; }

/* ── Comment / discussion section ────────────────────────────── */

[data-theme="dark"] .comment-section {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .comment-section h3 { color: #7dd3d0; }

/* ── Mid-post inline subscribe ────────────────────────────────── */

[data-theme="dark"] .inline-subscribe {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .inline-subscribe__text { color: #cdd9e5; }

[data-theme="dark"] .inline-subscribe__form input[type="email"] {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}

/* ── Newsletter page ──────────────────────────────────────────── */

[data-theme="dark"] .newsletter-heading { color: #7dd3d0; }
[data-theme="dark"] .newsletter-sub     { color: #8b949e; }

[data-theme="dark"] .newsletter-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .newsletter-perks {
  border-bottom-color: #30363d;
}

[data-theme="dark"] .perk strong { color: #e6edf3; }
[data-theme="dark"] .perk p      { color: #8b949e; }

[data-theme="dark"] .newsletter-email-input {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}

[data-theme="dark"] .newsletter-email-input:focus {
  background: #161b22;
  border-color: #4db6ac;
}

[data-theme="dark"] .newsletter-issues {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .newsletter-issues h2 {
  color: #7dd3d0;
  border-bottom-color: #30363d;
}

[data-theme="dark"] .issues-list li {
  background: #0d1117;
  border-color: #21262d;
}

[data-theme="dark"] .issues-list li:hover {
  background: #161b22;
  border-color: #4db6ac;
}

[data-theme="dark"] .issue-date { color: #6e7681; }
[data-theme="dark"] .issue-link { color: #4db6ac; }

/* ── Course page sections ─────────────────────────────────────── */

[data-theme="dark"] .course-section h2 {
  color: #7dd3d0;
  border-bottom-color: #30363d;
}

[data-theme="dark"] .pillar {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .pillar h4 { color: #7dd3d0; }
[data-theme="dark"] .pillar p  { color: #8b949e; }

[data-theme="dark"] .curriculum-item {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .curriculum-item--highlight {
  background: #0f2830;
  border-color: #2a5555;
}

[data-theme="dark"] .curriculum-item:hover {
  border-color: #4db6ac;
}

[data-theme="dark"] .week-badge {
  background: #0f2830;
  color: #4db6ac;
}

[data-theme="dark"] .week-badge--ai {
  background: #4db6ac;
  color: #0d1117;
}

[data-theme="dark"] .curriculum-info strong { color: #e6edf3; }
[data-theme="dark"] .curriculum-info span   { color: #6e7681; }

[data-theme="dark"] .capstone-item {
  background: #0f2830;
  border-color: #2a5555;
  color: #4db6ac;
}

[data-theme="dark"] .course-cta-section {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .course-cta-section p { color: #8b949e; }

[data-theme="dark"] .course-waitlist {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .course-waitlist__heading { color: #7dd3d0; }
[data-theme="dark"] .course-waitlist__sub     { color: #8b949e; }

[data-theme="dark"] .course-body table th {
  background: #0f2830;
  color: #7dd3d0;
  border-bottom-color: #2a5555;
}

[data-theme="dark"] .course-body table td {
  border-bottom-color: #21262d;
  color: #cdd9e5;
}

[data-theme="dark"] .course-body table tr:hover td {
  background: #161b22;
}

/* ── Buy card (price / checkout block) ───────────────────────── */

[data-theme="dark"] .buy-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .buy-price-amount { color: #7dd3d0; }
[data-theme="dark"] .buy-price-sub    { color: #6e7681; }
[data-theme="dark"] .buy-includes li  { color: #cdd9e5; }
[data-theme="dark"] .buy-label        { color: #cdd9e5; }
[data-theme="dark"] .buy-field-hint   { color: #6e7681; }
[data-theme="dark"] .buy-secure-note  { color: #6e7681; }

[data-theme="dark"] .buy-email-input {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}

[data-theme="dark"] .buy-email-input:focus {
  background: #161b22;
  border-color: #4db6ac;
}

/* ── Already a student / returning section ───────────────────── */

[data-theme="dark"] .buy-returning-toggle {
  border-color: #30363d;
  color: #4db6ac;
}

[data-theme="dark"] .buy-returning-toggle:hover,
[data-theme="dark"] .buy-returning-toggle--open {
  background: #0f2830;
  border-color: #4db6ac;
}

[data-theme="dark"] .buy-returning-panel {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .buy-returning-intro { color: #8b949e; }

[data-theme="dark"] .buy-returning-divider { color: #6e7681; }

[data-theme="dark"] .buy-returning-divider::before,
[data-theme="dark"] .buy-returning-divider::after {
  background: #30363d;
}

[data-theme="dark"] .buy-access-error {
  background: #1f0a0a;
  border-color: #5a1a1a;
  color: #f87171;
}

[data-theme="dark"] .buy-returning-success h3 { color: #7dd3d0; }
[data-theme="dark"] .buy-returning-success p  { color: #8b949e; }

[data-theme="dark"] .btn-access-course {
  background: #161b22;
  border-color: #4db6ac;
  color: #7dd3d0;
}

[data-theme="dark"] .btn-access-course:hover:not(:disabled) {
  background: #0f2830;
}

/* ── Lesson sidebar ───────────────────────────────────────────── */

[data-theme="dark"] .lesson-sidebar {
  background: #0d1117;
  border-right-color: #21262d;
}

[data-theme="dark"] .sidebar-header {
  border-bottom-color: #21262d;
}

[data-theme="dark"] .sidebar-back-link       { color: #4db6ac; }
[data-theme="dark"] .sidebar-back-link:hover { color: #7dd3d0; text-decoration: none; }
[data-theme="dark"] .sidebar-section-label   { color: #6e7681; }
[data-theme="dark"] .sidebar-section-hdr     { color: #6e7681; }

[data-theme="dark"] .sidebar-lesson { color: #cdd9e5; }

[data-theme="dark"] .sidebar-lesson:hover {
  background: #0f2830;
  color: #7dd3d0;
}

[data-theme="dark"] .sidebar-footer {
  border-top-color: #21262d;
}

[data-theme="dark"] .sidebar-course-link       { color: #6e7681; }
[data-theme="dark"] .sidebar-course-link:hover { color: #4db6ac; }

[data-theme="dark"] .sidebar-toggle {
  background: #161b22;
  border-color: #30363d;
  color: #4db6ac;
}

/* ── Lesson header ────────────────────────────────────────────── */

[data-theme="dark"] .lesson-header {
  border-bottom-color: #30363d;
}

[data-theme="dark"] .lesson-badge {
  background: #0f2830;
  color: #4db6ac;
}

[data-theme="dark"] .lesson-tag {
  background: #1c2128;
  color: #8b949e;
}

[data-theme="dark"] .lesson-title-main  { color: #7dd3d0; }
[data-theme="dark"] .lesson-description { color: #8b949e; }
[data-theme="dark"] .lesson-duration    { color: #6e7681; }

/* ── Lesson written content ───────────────────────────────────── */

[data-theme="dark"] .lesson-content h2 {
  color: #7dd3d0;
  border-bottom-color: #30363d;
}

[data-theme="dark"] .lesson-content h3 { color: #cdd9e5; }

[data-theme="dark"] .lesson-content p,
[data-theme="dark"] .lesson-content ul,
[data-theme="dark"] .lesson-content ol { color: #cdd9e5; }

[data-theme="dark"] .lesson-content code {
  background: #1c2128;
  color: #7dd3d0;
}

[data-theme="dark"] .lesson-content blockquote {
  background: #0f2830;
  border-left-color: #4db6ac;
  color: #8b949e;
}

[data-theme="dark"] .lesson-content table th {
  background: #0f2830;
  color: #7dd3d0;
  border-bottom-color: #2a5555;
}

[data-theme="dark"] .lesson-content table td {
  border-bottom-color: #21262d;
  color: #cdd9e5;
}

[data-theme="dark"] .lesson-content table tr:hover td {
  background: #161b22;
}

/* ── Callout / tip boxes ──────────────────────────────────────── */

[data-theme="dark"] .callout--tip {
  background: #0a1f0a;
  border-color: #2d5a2d;
}

[data-theme="dark"] .callout--info {
  background: #0a1520;
  border-color: #1a3a5c;
}

[data-theme="dark"] .callout--warn {
  background: #1a1500;
  border-color: #5a4a00;
}

[data-theme="dark"] .callout-body        { color: #cdd9e5; }
[data-theme="dark"] .callout-body strong { color: #e6edf3; }

/* ── Lesson pager (prev / next) ───────────────────────────────── */

[data-theme="dark"] .lesson-pager {
  border-top-color: #30363d;
}

[data-theme="dark"] .lesson-pager-btn {
  background: #161b22;
  border-color: #30363d;
  color: #7dd3d0;
}

[data-theme="dark"] .lesson-pager-btn:hover {
  background: #0f2830;
  border-color: #4db6ac;
}

[data-theme="dark"] .lesson-pager-btn small { color: #6e7681; }

/* ── Lesson discussion ────────────────────────────────────────── */

[data-theme="dark"] .lesson-discussion h3   { color: #7dd3d0; }
[data-theme="dark"] .lesson-discussion-note { color: #6e7681; }

/* ── Lesson cards (course index page) ────────────────────────── */

[data-theme="dark"] .lesson-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .lesson-card:hover {
  border-color: #4db6ac;
}

[data-theme="dark"] .lesson-card-num {
  background: #0f2830;
  color: #4db6ac;
}

[data-theme="dark"] .lesson-card-title { color: #e6edf3; }
[data-theme="dark"] .lesson-card-desc  { color: #8b949e; }

/* ── Dashboard ────────────────────────────────────────────────── */

[data-theme="dark"] .dash-stat-card {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .dash-stat-value    { color: #e6edf3; }
[data-theme="dark"] .dash-stat-icon--teal { background: #0f2830; color: #4db6ac; }

[data-theme="dark"] .dash-section {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .dash-section-title { color: #7dd3d0; }
[data-theme="dark"] .dash-section-meta  { color: #6e7681; }

[data-theme="dark"] .dash-continue-card {
  background: linear-gradient(135deg, #0f2830 0%, #1a3d3d 100%);
  border-color: #2a5555;
}

[data-theme="dark"] .dash-continue-card:hover { border-color: #4db6ac; }
[data-theme="dark"] .dash-continue-title      { color: #7dd3d0; }
[data-theme="dark"] .dash-continue-desc       { color: #8b949e; }

[data-theme="dark"] .next-steps {
  background: #161b22;
  border-color: #30363d;
}

[data-theme="dark"] .next-step-text { color: #cdd9e5; }

/* ── Payment success page ─────────────────────────────────────── */

[data-theme="dark"] .payment-success-page h1    { color: #7dd3d0; }
[data-theme="dark"] .payment-success-page .lead { color: #8b949e; }
[data-theme="dark"] .buy-success h3             { color: #7dd3d0; }
[data-theme="dark"] .buy-success p              { color: #8b949e; }
