/* ===========================
   單身獸爺的退休生活攻略 — Global Styles
   =========================== */

:root {
  --bg:          #14120f;
  --bg-surface:  #1c1915;
  --bg-card:     #241f19;
  --border:      #38312a;
  --accent:      #e8a34d;
  --accent-2:    #7fb8a4;
  --accent-dim:  #6b4d2a;
  --text:        #ffffff;
  --text-muted:  #ffffff;
  --text-dim:    #ffffff;
  --danger:      #d9705a;
  --success:     #7fb8a4;
  --radius:      12px;
  --radius-sm:   8px;
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition:  0.2s ease;
  --max-width:   1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===========================
   Header
   =========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 18, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-card);
  text-decoration: none;
}

/* ===========================
   Hero
   =========================== */

.hero {
  padding: 72px 24px 48px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 17px;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 49px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.9;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

/* ===========================
   Category Sections (homepage)
   =========================== */

.category-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  scroll-margin-top: 76px;
}

.category-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.category-icon {
  font-size: 34px;
}

.category-title {
  font-size: 29px;
  font-weight: 700;
}

.category-desc {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 24px;
  max-width: 640px;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* Topic Card */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: var(--transition);
}

.topic-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  text-decoration: none;
}

.topic-card:hover::before {
  opacity: 0.18;
}

.topic-card-icon {
  font-size: 31px;
  line-height: 1;
}

.topic-card-name {
  font-size: 21px;
  font-weight: 600;
}

.topic-card-desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.topic-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.status-badge {
  font-size: 14px;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.status-badge.ready {
  color: var(--success);
  border-color: rgba(127, 184, 164, 0.4);
  background: rgba(127, 184, 164, 0.08);
}

.status-badge.linkout {
  color: var(--accent);
  border-color: rgba(232, 163, 77, 0.4);
  background: rgba(232, 163, 77, 0.08);
}

.status-badge.pending {
  color: var(--text-dim);
}

.topic-card-arrow {
  color: var(--accent);
  font-size: 20px;
  opacity: 0;
  transition: var(--transition);
}

.topic-card:hover .topic-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ===========================
   About / Origin Section
   =========================== */

.about-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-text h2 {
  font-size: 29px;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.about-image {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
}

.about-image img {
  border-radius: var(--radius-sm);
}

.about-image-caption {
  text-align: center;
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ===========================
   Footer
   =========================== */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 17px;
}

/* ===========================
   Content Page (pages/.../index.html)
   =========================== */

/* .breadcrumb, .page-header and .page-content share a single centered
   ancestor (.content-main) so their left edges are guaranteed to line up,
   instead of each independently re-centering with its own max-width + margin auto. */
.content-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  padding: 20px 0 0;
  font-size: 10.2px;
  color: var(--text-dim);
}

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

.page-header {
  padding: 24px 0 32px;
}

.page-icon {
  font-size: 47px;
  margin-bottom: 14px;
  display: block;
}

.page-title {
  font-size: 39px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-desc {
  color: var(--text-muted);
  font-size: 20px;
  max-width: 720px;
}

.page-content {
  padding: 0 0 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

.page-sidebar {
  position: sticky;
  top: 76px;
  height: fit-content;
}

.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sidebar-link {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
  margin-bottom: 2px;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--bg-surface);
  color: var(--text);
  text-decoration: none;
}

.page-main {
  min-width: 0;
}

.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}

.content-section h2 {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.content-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--accent-2);
}

.content-section p {
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.85;
  margin-bottom: 12px;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 16px;
}

.link-list li {
  font-size: 18px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.7;
}

.link-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Figures / infographic images */
.figure {
  margin: 18px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.figure img {
  border-radius: 4px;
  margin: 0 auto;
}

.figure-caption {
  text-align: center;
  font-size: 16px;
  color: var(--text-dim);
  background: var(--bg-card);
  padding-top: 10px;
}

.figure-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 16px 0;
}

/* Info tables */
.info-table-wrap {
  overflow-x: auto;
  margin: 14px 0;
}

table.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}

table.info-table th,
table.info-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  color: var(--text-muted);
}

table.info-table th {
  background: var(--bg-surface);
  color: var(--text);
  font-weight: 600;
}

table.info-table tr:hover td {
  background: rgba(232, 163, 77, 0.05);
}

/* Checklist (bucket list) */
.checklist-group {
  margin-bottom: 22px;
}

.checklist-group-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

.checklist-item:hover {
  background: var(--bg-surface);
}

.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.checklist-item.checked span {
  color: var(--text-dim);
  text-decoration: line-through;
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--text-muted);
}

.progress-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  width: 0%;
  transition: width 0.3s ease;
}

/* External link-out card */
.linkout-card {
  border: 1px dashed var(--accent-dim);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: rgba(232, 163, 77, 0.05);
}

.linkout-card p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 18px;
  line-height: 1.7;
}

.btn-linkout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #14120f;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-linkout:hover {
  background: #f2b869;
  text-decoration: none;
}

/* Placeholder / coming soon */
.placeholder-block {
  text-align: center;
  padding: 60px 20px;
}

.placeholder-icon {
  font-size: 57px;
  margin-bottom: 18px;
  opacity: 0.6;
}

.placeholder-block h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.placeholder-block p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 420px;
  margin: 0 auto;
}

/* Callout box */
.callout {
  border-left: 3px solid var(--accent);
  background: rgba(232, 163, 77, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Prev/Next nav */
.page-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.page-footer-nav a {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 18px;
  color: var(--text-muted);
  transition: var(--transition);
}

.page-footer-nav a:hover {
  border-color: var(--accent-dim);
  color: var(--text);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 860px) {
  .about-inner {
    grid-template-columns: 1fr;
  }

  .page-content {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero-title { font-size: 36px; }
  .logo-text { font-size: 17px; }
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    padding: 8px 16px;
  }
  .site-nav { width: 100%; justify-content: center; }
}
