/* ═══════════════════════════════════════════════════
   KTC Blog — Shared Stylesheet
   Brand: Teal #008080 + Coral #DF4C4C
   Font: Inter (Google Fonts)
   ═══════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --ktc-teal: #008080;
  --ktc-teal-light: #00a3a3;
  --ktc-teal-dark: #006666;
  --ktc-teal-10: rgba(0, 128, 128, 0.1);
  --ktc-teal-20: rgba(0, 128, 128, 0.2);
  --ktc-coral: #DF4C4C;
  --ktc-coral-light: #ff6b6b;
  --ktc-coral-10: rgba(223, 76, 76, 0.1);
  --bg-primary: #fafbfc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);
  --gradient-teal: linear-gradient(135deg, #008080 0%, #00a3a3 100%);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-teal: 0 4px 16px rgba(0, 128, 128, 0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Site Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.site-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav-logo { height: 28px; width: auto; }
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.site-nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: 0.3px;
}
.site-nav-links a:hover { color: var(--ktc-teal); }
.site-nav-links a.active { color: var(--ktc-teal); font-weight: 600; }
.nav-cta {
  background: var(--gradient-teal);
  color: #fff !important;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  transition: opacity 0.2s ease;
}
.nav-cta:hover { opacity: 0.9; }

/* ── Hero (Blog Home) ── */
.blog-hero {
  background: var(--gradient-teal);
  position: relative;
  overflow: hidden;
  padding: 72px 24px 64px;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,163,163,0.3) 0%, transparent 40%);
  pointer-events: none;
}
.blog-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.blog-hero-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -2px;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 16px;
}
.blog-hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 600px;
}
.blog-hero-accent {
  width: 48px;
  height: 3px;
  background: var(--ktc-coral);
  border-radius: 2px;
  margin-top: 28px;
}

/* ── Post Cards (Index) ── */
.posts-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.posts-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.posts-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ktc-teal);
}
.posts-count {
  font-size: 13px;
  color: var(--text-muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  transition: all 0.25s ease;
}
.post-card:hover {
  border-color: var(--ktc-teal-20);
  box-shadow: var(--shadow-teal);
  transform: translateY(-2px);
}

.post-card-accent {
  flex-shrink: 0;
  width: 4px;
  height: 100%;
  min-height: 100px;
  border-radius: 2px;
  background: var(--gradient-teal);
}

.post-card-body { flex: 1; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.post-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ktc-teal);
  background: var(--ktc-teal-10);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.post-card-tag .dot {
  width: 5px;
  height: 5px;
  background: var(--ktc-coral);
  border-radius: 50%;
}
.post-card-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.post-card-reading {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.post-card h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.post-card-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ktc-teal);
  transition: gap 0.2s ease;
}
.post-card:hover .post-card-link { gap: 10px; }
.post-card-link svg {
  width: 14px;
  height: 14px;
  stroke: var(--ktc-teal);
  stroke-width: 2;
  fill: none;
}

/* ── Post Page ── */
/* Post Hero */
.post-hero {
  background: var(--gradient-teal);
  position: relative;
  overflow: hidden;
  padding: 80px 24px 72px;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,163,163,0.3) 0%, transparent 40%);
  pointer-events: none;
}
.post-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.post-hero-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.post-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -2px;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 20px;
}
.post-hero-subtitle {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 640px;
}
.post-hero-accent {
  width: 48px;
  height: 3px;
  background: var(--ktc-coral);
  border-radius: 2px;
  margin: 28px 0 0;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.post-hero-meta span {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
}
.post-hero-meta .separator {
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
}

/* Post Content */
.post-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* Article sections */
.section {
  margin-bottom: 56px;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ktc-teal);
  margin-bottom: 12px;
}
.section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}
.section p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}
.gradient-text {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Callout */
.callout {
  background: var(--ktc-teal-10);
  border-left: 3px solid var(--ktc-teal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}
.callout p {
  font-size: 15px;
  font-weight: 500;
  color: var(--ktc-teal-dark);
  margin-bottom: 0;
  line-height: 1.65;
}

/* Stat Bar */
.stat-bar {
  background: var(--gradient-teal);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  justify-content: space-around;
  margin: 32px 0;
  flex-wrap: wrap;
  gap: 16px;
}
.stat-item { text-align: center; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
}

/* Standards Badges */
.standards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.standard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--ktc-teal-20);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ktc-teal);
  transition: all 0.2s ease;
}
.standard-badge:hover {
  background: var(--ktc-teal-10);
  border-color: var(--ktc-teal);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ktc-coral);
  flex-shrink: 0;
}

/* Phases */
.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all 0.2s ease;
}
.phase-card:hover {
  border-color: var(--ktc-teal-20);
  box-shadow: var(--shadow-teal);
}
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gradient-teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.phase-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.phase-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Diagram */
.diagram-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
}
.diagram-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}
.diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}
.diagram-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  position: relative;
}
.diagram-box {
  background: var(--bg-card);
  border: 1.5px solid var(--ktc-teal-20);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  min-width: 160px;
  transition: all 0.2s ease;
}
.diagram-box:hover {
  border-color: var(--ktc-teal);
  box-shadow: var(--shadow-teal);
}
.diagram-box.primary {
  background: var(--gradient-teal);
  border-color: transparent;
  color: #fff;
}
.diagram-box.primary .box-title { color: #fff; }
.diagram-box.primary .box-sub { color: rgba(255,255,255,0.8); }
.diagram-box.twin {
  border: 1.5px dashed var(--ktc-teal-20);
  background: rgba(0, 128, 128, 0.03);
  padding: 20px 28px;
  min-width: 220px;
}
.box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.box-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.diagram-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  color: var(--ktc-teal);
  font-size: 18px;
}
.diagram-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--ktc-teal);
  stroke-width: 2;
  fill: none;
}

/* ── Back Link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  transition: color 0.2s ease;
}
.back-link:hover { color: #fff; }
.back-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Author Block ── */
.author-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin: 48px 0 0;
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.author-info { flex: 1; }
.author-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.author-role {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Share Row ── */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.share-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.share-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-btn:hover {
  border-color: var(--ktc-teal-20);
  box-shadow: var(--shadow-teal);
}
.share-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
}
.share-btn:hover svg { stroke: var(--ktc-teal); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 48px 24px;
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer-logo { height: 32px; width: auto; }
.site-footer-text {
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.site-footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.site-footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.site-footer-links a:hover { color: var(--ktc-teal); }

/* ── Animations ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}
.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.15s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.25s; }
.animate-in:nth-child(5) { animation-delay: 0.3s; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .site-nav-links { gap: 16px; }
  .site-nav-links .nav-hide-mobile { display: none; }
  .blog-hero { padding: 56px 20px 48px; }
  .post-hero { padding: 56px 20px 48px; }
  .posts-section { padding: 40px 20px 64px; }
  .post-content { padding: 40px 20px 64px; }
  .post-card { flex-direction: column; gap: 0; padding: 24px; }
  .post-card-accent { width: 100%; height: 4px; min-height: unset; margin-bottom: 20px; }
  .phases { grid-template-columns: 1fr; }
  .diagram-row { flex-direction: column; gap: 0; }
  .stat-bar { flex-direction: column; padding: 24px 20px; }
  .site-footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}
