/* ==========================================================================
   The Product Nest — Design System
   Fonts: Lora (serif body) + Inter (sans UI)
   Palette: #FAFAF8 bg, #1A1A1A text, #2A7F7F accent, #F2F0EB callouts
   ========================================================================== */

/* --- Reset & Base --- */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #1A1A1A;
  background-color: #FAFAF8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #2A7F7F;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #1F5F5F;
}

/* --- Layout Containers --- */

.content-narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */

h1, h2, h3, h4 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: #1A1A1A;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

blockquote {
  border-left: 3px solid #2A7F7F;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #4A4A4A;
  font-style: italic;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background-color: #F2F0EB;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background-color: #F2F0EB;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid #E0DDD6;
  margin: 3rem 0;
}

/* --- Header --- */

.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid #E0DDD6;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-img {
  height: 36px;
  width: auto;
}

.site-nav a {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4A4A4A;
  margin-left: 2rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #2A7F7F;
}

/* Mobile nav toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #1A1A1A;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- Main Content --- */

main {
  min-height: 60vh;
  padding: 3rem 0;
}

/* --- Page Layout --- */

.page {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* --- Post Layout --- */

.post {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-date {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: #7A7A7A;
}

.post-content h2 {
  margin-top: 2.5rem;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #E0DDD6;
}

.back-link {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- Home Page --- */

.home-hero {
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.hero-content {
  flex: 1;
}

.home-hero .lede {
  font-size: 1.35rem;
  line-height: 1.6;
  color: #1A1A1A;
  margin-bottom: 0;
}

.hero-image {
  flex-shrink: 0;
}

.hero-illustration {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.home-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
  margin-bottom: 3rem;
}

.home-section h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* --- Thoughts Index --- */

.thoughts-list {
  list-style: none;
  padding: 0;
}

.thoughts-list li {
  margin-bottom: 1.75rem;
}

.thoughts-list a {
  display: block;
}

.thoughts-list .thought-title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1A1A1A;
  transition: color 0.15s ease;
}

.thoughts-list a:hover .thought-title {
  color: #2A7F7F;
}

.thoughts-list .thought-date {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: #7A7A7A;
  margin-top: 0.15rem;
}

.thoughts-list .thought-description {
  font-size: 1rem;
  color: #4A4A4A;
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* --- CTA Illustration --- */

.cta-illustration {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 1.25rem;
}

/* --- About Page --- */

.about-intro {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: 1rem;
}

.about-intro-text {
  flex: 1;
}

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

.headshot {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

/* --- Post Featured Image --- */

.post-featured-image {
  float: right;
  max-width: 260px;
  height: auto;
  border-radius: 8px;
  margin: 0.25rem 0 1rem 1.5rem;
  object-fit: cover;
}

.post-content::after {
  content: "";
  display: table;
  clear: both;
}

/* --- Thoughts List with Images --- */

.thoughts-list--with-images li {
  margin-bottom: 2rem;
}

.thoughts-list--with-images a {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.thought-thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.thought-text {
  flex: 1;
}

/* --- Contact Page --- */

.contact-section {
  margin-bottom: 3rem;
}

/* --- Beliefs Preview (Home) --- */

.beliefs-preview {
  background-color: #F2F0EB;
  padding: 2rem;
  border-radius: 8px;
}

.beliefs-preview ul {
  margin-bottom: 1rem;
}

.beliefs-preview .read-more {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- CTA Section --- */

.cta-section {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: #F2F0EB;
  border-radius: 8px;
}

.cta-section h2 {
  margin-top: 0;
}

.cta-section a {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid #E0DDD6;
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.site-footer p {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: #7A7A7A;
  margin: 0;
}

.footer-tagline {
  font-style: italic;
  margin-bottom: 0.5rem !important;
}

.footer-links {
  margin-top: 0.5rem !important;
}

.footer-links a {
  color: #7A7A7A;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #2A7F7F;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  body {
    font-size: 1rem;
  }

  .home-hero .lede {
    font-size: 1.15rem;
  }

  /* Stack hero layout on mobile */
  .home-hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-illustration {
    width: 160px;
    height: 160px;
  }

  /* Stack about intro on mobile */
  .about-intro {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .headshot {
    width: 160px;
    height: 160px;
  }

  /* Stack featured image on mobile */
  .post-featured-image {
    float: none;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
  }

  /* Stack thought thumbnails on mobile */
  .thoughts-list--with-images a {
    flex-direction: column;
    gap: 0.75rem;
  }

  .thought-thumbnail {
    width: 100%;
    height: 180px;
    border-radius: 8px;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #FAFAF8;
    border-bottom: 1px solid #E0DDD6;
    padding: 1rem 1.5rem;
    flex-direction: column;
  }

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

  .site-nav a {
    margin-left: 0;
    padding: 0.5rem 0;
    font-size: 1.1rem;
  }

  .site-header {
    position: relative;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  main {
    padding: 2rem 0;
  }

  .beliefs-preview {
    padding: 1.25rem;
  }

  .cta-section {
    padding: 1.5rem 1rem;
  }
}
