:root {
  --bg: #FAFAF8;
  --text: #111111;
  --subtext: #666666;
  --accent: #B8AE84;
  --accent-dark: #8B7F5C;
  --card-bg: #FFFFFF;
  --border: #E8E6E0;
  --hero-bg: #F9F8F4;
  --cta-bg: #F4F2EB;
  --radius: 2px;
  --nav-bg: rgba(250, 250, 248, 0.95);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg: #0F0F0F;
  --text: #E8E8E8;
  --subtext: #999999;
  --accent: #C4B896;
  --accent-dark: #A89968;
  --card-bg: #1A1A1A;
  --border: #2A2A2A;
  --hero-bg: #151515;
  --cta-bg: #1C1C1C;
  --nav-bg: rgba(15, 15, 15, 0.95);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);
  --hero-gradient: linear-gradient(to bottom, #151515 0%, #1A1A1A 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.inner-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-title:hover {
  color: var(--accent-dark);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
  letter-spacing: 0.2px;
}

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

.nav-links a.active {
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.8;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  transition: transform 0.2s;
  line-height: 1;
}

.toggle-btn:hover {
  transform: scale(1.1);
}

/* MOBILE NAV */
@media(max-width: 768px) {
  .inner-nav {
    padding: 0 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .site-title {
    font-size: 1rem;
  }
}

@media(max-width: 640px) {
  .nav-links a {
    display: none;
  }

  .toggle-btn {
    display: block;
  }
}

/* Main Container (Home) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* Article Container */
.article-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}

.post-view-container {
  padding: 60px 40px;
}

.hero {
  background: linear-gradient(to bottom, #F9F8F4 0%, #F4F2EB 100%);
  padding: 120px 40px 105px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

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

.hero h1 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 4rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 32px 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--subtext);
  margin-bottom: 40px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-desc {
  max-width: 680px;
  margin: 0 auto 48px;
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1.8;
  font-style: italic;
  font-family: 'Crimson Pro', Georgia, serif;
  opacity: 0.9;
}

.cta-btn {
  background: var(--text);
  color: var(--bg);
  padding: 13px 48px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  min-width: 220px;
  text-align: center;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border: 2px solid var(--text);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

button.cta-btn {
  padding: 12px 48px;
}

.cta-btn:hover {
  background: transparent;
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media(max-width: 768px) {
  .hero {
    padding: 80px 20px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }
}

/* SECTION HEADERS */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--subtext);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* POSTS GRID - Clean, spacious layout */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 100px;
}

@media(min-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.post-card {
  background: var(--card-bg);
  padding: 48px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  display: block;
  cursor: pointer;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  position: relative;
  top: 0;
}

[data-theme="dark"] .hero {
  background: var(--hero-gradient);
}

[data-theme="dark"] .post-card {
  border: 1px solid #2a2a2a;
  background: rgba(255, 255, 255, 0.02);
}

.post-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
  border-color: var(--accent);
}

[data-theme="dark"] .post-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.post-date {
  font-size: 0.85rem;
  color: var(--subtext);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.post-title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
  line-height: 1.3;
  min-height: 2.6em;
}

.post-excerpt {
  margin: 0;
  font-size: 1rem;
  color: var(--subtext);
  line-height: 1.7;
}

@media(max-width: 768px) {
  .post-card {
    padding: 30px 24px;
  }

  .post-title {
    font-size: 1.4rem;
  }
}

/* POST DETAIL VIEW & ARTICLE STYLES */
.post-detail-content {
  max-width: 680px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  margin-bottom: 40px;
  color: var(--subtext);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--text);
}

.post-detail-title,
.article-container h1 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 3rem;
  font-weight: 600;
  margin: 0 0 40px 0;
  line-height: 1.2;
  color: var(--text);
}

.post-detail-date,
.article-date {
  font-size: 0.9rem;
  color: var(--subtext);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.post-detail-body,
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.post-detail-body p,
.article-content p {
  margin-bottom: 24px;
}

.post-detail-body h3,
.article-content h3 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 20px;
  color: var(--text);
}

.post-detail-body ul,
.post-detail-body ol,
.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.post-detail-body li,
.article-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.post-detail-body strong,
.article-content strong {
  font-weight: 600;
  color: var(--text);
}

@media(max-width: 768px) {

  .post-detail-title,
  .article-container h1 {
    font-size: 2.2rem;
  }

  .post-detail-body,
  .article-content {
    font-size: 1.05rem;
  }
}

/* NEWSLETTER CTA SECTION */
.newsletter-cta {
  background: #faf9f6;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 80px 40px;
  text-align: center;
  margin: 80px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .newsletter-cta {
  background: #111;
}

.newsletter-cta h3::before {
  content: '✉️';
  display: block;
  font-size: 2rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.newsletter-cta h3 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
}

.newsletter-cta p {
  font-size: 1.1rem;
  color: var(--subtext);
  margin: 0 0 32px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 575px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent-dark);
}

.newsletter-btn {
  background: var(--text);
  color: var(--bg);
  padding: 14px 28px;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.newsletter-btn:hover {
  background: transparent;
  color: var(--text);
}

@media(max-width: 640px) {
  .newsletter-cta {
    padding: 40px 24px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }
}

/* FOOTER */
/* ABOUT SECTION */
.about-section {
  max-width: 800px;
  margin: 100px auto 0;
  padding-top: 80px;
  border-top: 1px solid var(--border);
}

.about-title {
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
  margin-bottom: 48px;
  width: 100%;
}

.about-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--subtext);
  margin: 0;
}

.about-image-wrapper {
  flex-shrink: 0;
}

.about-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media(max-width: 768px) {
  .about-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }
}

/* FOOTER */
.footer-divider {
  opacity: 0.1;
  margin: 80px auto;
  max-width: 800px;
  border: 0;
  border-top: 1px solid var(--text);
}

footer {
  text-align: center;
  padding: 0 40px 80px;
  color: var(--subtext);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
}

.social-links a {
  color: var(--subtext);
  /* Use subtext color instead of opacity */
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  padding: 0 10px;
  position: relative;
}

.social-links a:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background-color: var(--text);
  opacity: 0.4;
  /* Distinct opacity for separator */
  z-index: 1;
}

.social-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notification.error {
  background-color: #e74c3c;
  color: white;
}