/* =========================================
   TheDPCJourney.com Design System
   Warm Minimalist Personal Blog
   ========================================= */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400;1,8..60,500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --cream: #faf8f5;
  --cream-dark: #f0ece5;
  --forest: #2d6a4f;
  --forest-light: #40916c;
  --forest-dark: #1b4332;
  --brown: #3d2c2c;
  --brown-light: #5c4444;
  --sage: #7c9a82;
  --sage-light: #a7c4ab;
  --sage-pale: #dce8de;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --gold-pale: #f5edcf;
  --white: #ffffff;
  --border: #e2ddd5;
  --border-light: #ece8e1;
  --shadow-sm: 0 1px 3px rgba(61, 44, 44, 0.06);
  --shadow-md: 0 4px 12px rgba(61, 44, 44, 0.08);
  --shadow-lg: 0 8px 24px rgba(61, 44, 44, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --content-width: 680px;
  --page-width: 960px;
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--brown);
  background-color: var(--cream);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  color: var(--forest-light);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--brown);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.6rem; margin-bottom: 0.5em; }
h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.4em; }

p {
  margin-bottom: 1.4em;
}

blockquote {
  border-left: 3px solid var(--sage);
  padding: 0.5em 0 0.5em 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--brown-light);
}

/* --- Layout --- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover {
  color: var(--forest);
}

.logo-leaf {
  color: var(--sage);
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--brown-light);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--forest);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--forest);
  border-radius: 1px;
}

.main-content {
  flex: 1;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

/* --- Home Layout with Sidebar --- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.content-column {
  max-width: var(--content-width);
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.about-sidebar p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--brown-light);
  margin-bottom: 0.5em;
}

.status-card {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest) 100%);
  color: var(--white);
  border: none;
}

.status-card h3 {
  color: var(--sage-light);
  border-bottom-color: rgba(255,255,255,0.15);
}

.status-card .status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-light);
  margin-bottom: 0.15rem;
}

.status-card .status-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.status-card .status-value:last-child {
  margin-bottom: 0;
}

.cost-tracker {
  background: var(--gold-pale);
  border-color: var(--gold-light);
}

.cost-tracker h3 {
  color: var(--gold);
}

.cost-tracker .cost-total {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 0.25rem;
}

.cost-tracker .cost-label {
  font-size: 0.8rem;
  color: var(--brown-light);
}

.cost-tracker .cost-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--forest);
  font-weight: 500;
}

/* --- Featured Post --- */
.featured-post {
  margin-bottom: 2.5rem;
}

.featured-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.featured-post h2 {
  font-size: 1.8rem;
  margin-bottom: 0.3em;
}

.featured-post h2 a {
  color: var(--brown);
  text-decoration: none;
}

.featured-post h2 a:hover {
  color: var(--forest);
}

.post-meta {
  font-size: 0.8rem;
  color: var(--sage);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.post-meta time {
  color: var(--sage);
}

.featured-post .post-excerpt {
  font-size: 1rem;
  color: var(--brown-light);
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--forest);
  font-weight: 500;
}

.read-more:hover {
  color: var(--forest-light);
}

/* --- Post Divider (botanical-inspired) --- */
.post-divider {
  text-align: center;
  margin: 2rem 0;
  color: var(--sage-light);
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  user-select: none;
}

.post-divider::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--border);
  vertical-align: middle;
  margin-right: 1rem;
}

.post-divider::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--border);
  vertical-align: middle;
  margin-left: 1rem;
}

/* --- Post List --- */
.posts-section h2 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.post-list {
  list-style: none;
}

.post-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.post-list-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.post-list-item h3 a {
  color: var(--brown);
}

.post-list-item h3 a:hover {
  color: var(--forest);
}

.post-list-item .post-meta {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
}

.post-list-item .post-excerpt {
  font-size: 0.88rem;
  color: var(--brown-light);
  line-height: 1.6;
}

/* --- Single Post --- */
.post-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-header h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.post-header .post-meta {
  font-size: 0.85rem;
}

.post-body {
  font-size: 1rem;
  line-height: 1.85;
}

.post-body p {
  margin-bottom: 1.5em;
}

.post-body a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--sage-light);
  text-underline-offset: 2px;
}

.post-body a:hover {
  text-decoration-color: var(--forest);
}

.post-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  font-size: 0.72rem;
  background: var(--sage-pale);
  color: var(--forest-dark);
  padding: 0.2em 0.7em;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.post-nav a {
  font-size: 0.85rem;
  color: var(--forest);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 45%;
}

.post-nav a span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
}

.post-nav .nav-next {
  text-align: right;
  margin-left: auto;
}

/* --- Archive Page --- */
.archive-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.archive-page h1 {
  text-align: center;
  margin-bottom: 2rem;
}

.archive-month {
  margin-bottom: 2rem;
}

.archive-month h2 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

.archive-month .post-list-item {
  padding: 0.75rem 0;
}

/* --- Timeline Page --- */
.timeline-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.timeline-page h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.timeline-intro {
  text-align: center;
  color: var(--brown-light);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sage-light), var(--forest), var(--gold));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--forest);
  z-index: 1;
}

.timeline-item.milestone-major .timeline-dot {
  background: var(--forest);
  border-color: var(--forest);
  width: 18px;
  height: 18px;
  left: calc(-2rem - 1px);
}

.timeline-item.milestone-gold .timeline-dot {
  background: var(--gold);
  border-color: var(--gold);
}

.timeline-date {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-title a {
  color: var(--brown);
}

.timeline-title a:hover {
  color: var(--forest);
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--brown-light);
  line-height: 1.6;
}

.timeline-cost {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-pale);
  padding: 0.15em 0.6em;
  border-radius: 20px;
}

/* --- About Page --- */
.about-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.about-page h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.about-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--brown-light);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.about-content {
  font-size: 1rem;
  line-height: 1.85;
}

.about-content p {
  margin-bottom: 1.4em;
}

/* --- Costs Page --- */
.costs-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.costs-page h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.costs-intro {
  text-align: center;
  color: var(--brown-light);
  margin-bottom: 2.5rem;
}

.costs-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cost-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cost-summary-card .amount {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--forest-dark);
}

.cost-summary-card .label {
  font-size: 0.78rem;
  color: var(--brown-light);
  margin-top: 0.25rem;
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.cost-table thead {
  border-bottom: 2px solid var(--border);
}

.cost-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage);
  padding: 0.75rem 0.5rem;
  text-align: left;
}

.cost-table td {
  padding: 0.75rem 0.5rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.cost-table .amount-cell {
  font-weight: 600;
  color: var(--forest-dark);
  white-space: nowrap;
}

.cost-table .detail-cell {
  font-size: 0.8rem;
  color: var(--brown-light);
  line-height: 1.5;
}

.cost-table .month-cell {
  font-size: 0.8rem;
  color: var(--sage);
  white-space: nowrap;
}

/* --- Legal Pages --- */
.legal-page {
  max-width: var(--content-width);
  margin: 0 auto;
}

.legal-page h1 {
  margin-bottom: 1.5rem;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--brown-light);
}

.legal-page ul {
  margin: 0.5em 0 1.5em 1.5em;
  font-size: 0.92rem;
  color: var(--brown-light);
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-light);
  margin-bottom: 0.75rem;
}

.footer-col p, .footer-col a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.3rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom {
  max-width: var(--page-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* --- Mobile Nav Toggle --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--brown);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

/* --- Responsive --- */
@media (max-width: 820px) {
  html { font-size: 17px; }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  html { font-size: 16px; }

  .header-inner {
    padding: 0 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .site-nav.open {
    display: flex;
  }

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

  h1 { font-size: 1.7rem; }
  .featured-post h2 { font-size: 1.4rem; }

  .post-header h1 {
    font-size: 1.6rem;
  }

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

  .costs-summary {
    grid-template-columns: 1fr;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
  }

  .footer-inner {
    flex-direction: column;
  }

  .cost-table {
    font-size: 0.82rem;
  }

  .cost-table th, .cost-table td {
    padding: 0.5rem 0.3rem;
  }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .sidebar, .post-nav {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .main-content {
    max-width: 100%;
    padding: 0;
  }
}
