/*
Theme Name: AiDrChou Dark Medical Theme
Theme URI: https://aidrchou.com
Author: 小愛 (Hermes Agent)
Author URI: https://aidrchou.com
Description: 周醫師專屬官方旗艦暗黑科技醫療美學主題。極致響應式佈局、動態文章網格、精選主打專欄、沉浸式單篇閱讀器與智慧聯絡系統。
Version: 1.0.0
Text Domain: aidrchou
*/

:root {
  --bg-primary: #070a12;
  --bg-secondary: #0d1322;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 56, 0.9);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 212, 255, 0.35);
  
  --cyan-400: #00d4ff;
  --cyan-500: #00b4d8;
  --cyan-glow: rgba(0, 212, 255, 0.25);
  
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-dim: #94a3b8;
  
  --font-serif: 'Noto Serif TC', serif;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--cyan-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.75;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-400), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff 0%, var(--cyan-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--cyan-400);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-400) 0%, var(--cyan-500) 100%);
  color: #040812;
  box-shadow: 0 4px 14px var(--cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan-400);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title span {
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--purple-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.stat-item h4 {
  font-size: 1.8rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-item h4 span {
  color: var(--cyan-400);
  font-size: 1.2rem;
}

.stat-item p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(139, 92, 246, 0.3));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.hero-image {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 14px;
  display: block;
}

/* Featured Section */
.featured-section {
  padding: 40px 0 60px 0;
}

.featured-card {
  background: linear-gradient(135deg, rgba(13, 19, 34, 0.95) 0%, rgba(20, 28, 48, 0.95) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 212, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan-400), var(--purple-500));
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber-400);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.featured-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.4;
  margin-bottom: 16px;
  color: #fff;
}

.featured-title a:hover {
  color: var(--cyan-400);
}

.featured-excerpt {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.featured-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-dim);
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover, .tab-btn.active {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--cyan-400);
  color: #fff;
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* Post Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.article-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 212, 255, 0.15);
}

.card-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--cyan-400);
}

.card-h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 12px;
  color: #fff;
}

.card-h3 a:hover {
  color: var(--cyan-400);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.card-link {
  color: var(--cyan-400);
  font-weight: 600;
}

/* Single Post Page */
.single-post-container {
  max-width: 900px;
  margin: 40px auto 80px auto;
  padding: 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

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

.breadcrumb a:hover {
  color: var(--cyan-400);
}

.single-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.single-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 20px;
}

.single-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.single-meta-badge {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.featured-img-container {
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.featured-img-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Content Rich Styling */
.post-content {
  font-size: 1.08rem;
  line-height: 1.9;
  color: #e2e8f0;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: #fff;
  margin: 44px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-content h2 span.icon {
  color: var(--cyan-400);
}

.post-content h3 {
  font-size: 1.3rem;
  color: #f1f5f9;
  margin: 30px 0 14px 0;
}

.post-content ul, .post-content ol {
  margin: 16px 0 24px 28px;
  color: var(--text-muted);
}

.post-content li {
  margin-bottom: 10px;
}

.post-content strong {
  color: #fff;
}

.post-content em {
  color: #cbd5e1;
}

.post-content blockquote {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-left: 4px solid var(--cyan-400);
  padding: 18px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #f8fafc;
  font-size: 1.05rem;
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 40px 0;
}

.post-content pre {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.95rem;
  color: #38bdf8;
  margin: 24px 0;
}

/* Author Box */
.author-box {
  background: rgba(13, 19, 34, 0.8);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 30px;
  margin: 50px 0 40px 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.author-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  border: 2px solid var(--cyan-400);
  box-shadow: 0 0 16px var(--cyan-glow);
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 6px;
}

.author-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Post Nav */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.2s ease;
}

.nav-card:hover {
  border-color: var(--cyan-400);
  background: var(--bg-card-hover);
}

.nav-label {
  font-size: 0.8rem;
  color: var(--cyan-400);
  font-weight: 600;
  margin-bottom: 6px;
}

.nav-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  background: rgba(7, 10, 18, 0.95);
  padding: 60px 0 40px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--cyan-400);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-title { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}


/* About & Contact 2-Column Luxury Grid */
.about-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.about-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.about-contact-card {
  background: linear-gradient(135deg, rgba(13, 19, 34, 0.95), rgba(20, 30, 50, 0.85));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-glow);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}


/* COMPACT HERO & POLISHED CATEGORY PILLARS BAR */
.hero {
  padding: 40px 0 30px 0 !important;
}

.pillars-nav-bar {
  background: linear-gradient(135deg, rgba(13, 19, 34, 0.85), rgba(20, 30, 50, 0.75));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin: 10px 0 40px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.pillars-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.pillars-nav-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillars-nav-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.category-pill-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.category-pill-btn {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.category-pill-btn:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-400);
  box-shadow: 0 0 16px var(--cyan-glow);
  color: #ffffff;
}

.category-pill-btn.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(139, 92, 246, 0.25));
  border-color: var(--cyan-400);
  color: #ffffff;
  box-shadow: 0 0 18px var(--cyan-glow);
}

.pill-medical { border-color: rgba(56, 189, 248, 0.4); }
.pill-medical:hover { border-color: #38bdf8; box-shadow: 0 0 16px rgba(56, 189, 248, 0.4); }

.pill-ai { border-color: rgba(167, 139, 250, 0.4); }
.pill-ai:hover { border-color: #c084fc; box-shadow: 0 0 16px rgba(167, 139, 250, 0.4); }

.pill-life { border-color: rgba(251, 113, 133, 0.4); }
.pill-life:hover { border-color: #fb7185; box-shadow: 0 0 16px rgba(251, 113, 133, 0.4); }

.pill-dialogue { border-color: rgba(251, 191, 36, 0.4); }
.pill-dialogue:hover { border-color: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.4); }

/* ENHANCED TEXT CONTRAST & BRIGHTNESS */
body, p, li {
  color: #f1f5f9;
}

.hero-desc {
  color: #f1f5f9 !important;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.stat-item p {
  color: #cbd5e1 !important;
  font-weight: 500;
}

.featured-excerpt {
  color: #e2e8f0 !important;
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
}

.article-excerpt {
  color: #cbd5e1 !important;
  line-height: 1.7 !important;
}

.pillars-nav-desc, .about-desc, .contact-desc {
  color: #e2e8f0 !important;
}

.article-container p, .article-container li {
  color: #f8fafc !important;
  line-height: 1.9 !important;
}

/* ENHANCED TABLE CONTRAST */
table td {
  color: #f1f5f9;
  font-size: 0.95rem;
}

table td:nth-child(2) {
  color: #e2e8f0;
}
