/* ============================================================
   Tagores Theme — tagores.com
   Warm, art-forward, generous with space and images.
   
   Palette:
   - Background:    #faf7f2  (warm cream)
   - Text:          #2c2420  (deep warm brown)
   - Secondary:     #7a6b5d  (warm grey-brown)
   - Accent:        #b8704a  (terracotta)
   - Accent soft:   #d4a882  (soft clay)
   - Border:        #e8dfd4  (warm sand)
   - Card bg:       #fff9f4  (near-white warm)
   
   Fonts:
   - Display:       Cormorant Garamond (500, 600)
   - Body:          Source Sans 3 (300, 400, 600)
   - Mono/Meta:     DM Mono (300, 400)
   ============================================================ */

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

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

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;
  font-weight: 300;
  color: #2c2420;
  background: #faf7f2;
  line-height: 1.7;
}

a {
  color: #b8704a;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #944c2a;
}

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

/* --- Layout --- */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Header --- */
.site-header {
  padding: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #e8dfd4;
  padding-bottom: 1.5rem;
}

.site-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.6rem;
  color: #2c2420;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-title:hover {
  color: #b8704a;
}

.site-nav {
  display: flex;
  gap: 2rem;
}
.site-nav a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.78rem;
  color: #7a6b5d;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.site-nav a:hover {
  color: #b8704a;
}

/* --- Home / Post Feed --- */
.home-container {
  padding: 2rem 0 4rem;
}

.site-intro {
  max-width: 680px;
  margin: 0 auto 4rem;
  text-align: center;
}

.site-description {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.35rem;
  color: #7a6b5d;
  line-height: 1.6;
}

.post-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 900px;
  margin: 0 auto;
}

/* --- Post Card --- */
.post-card {
  position: relative;
}

.post-card--with-image .post-card-image-link {
  display: block;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 2px;
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card-image-link:hover .post-card-image {
  transform: scale(1.02);
}

.post-card-content {
  max-width: 680px;
}

.post-card-meta {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
}

.post-card-tag {
  text-transform: lowercase;
  color: #b8704a;
}

.post-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.post-card-title a {
  color: #2c2420;
  text-decoration: none;
}
.post-card-title a:hover {
  color: #b8704a;
}

.post-card-excerpt {
  font-size: 0.95rem;
  color: #7a6b5d;
  line-height: 1.65;
}

/* --- Post Full --- */
.post-full {
  max-width: 100%;
  padding: 0 0 4rem;
}

.post-hero-image {
  margin: 0 -2rem 3rem;
  max-width: calc(100% + 4rem);
}
.post-hero-image img {
  width: 100%;
  max-height: 65vh;
  object-fit: cover;
}

.post-header {
  max-width: 680px;
  margin: 0 auto 3rem;
}

.post-meta {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
}

.post-tag {
  text-transform: lowercase;
  color: #b8704a;
}

.post-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 2.8rem;
  line-height: 1.15;
  color: #2c2420;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  color: #7a6b5d;
  line-height: 1.55;
}

/* --- Post Content --- */
.post-content {
  max-width: 680px;
  margin: 0 auto;
}

.post-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.75;
}

.post-content h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.7rem;
  margin: 3rem 0 1rem;
  color: #2c2420;
}

.post-content h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.3rem;
  margin: 2.5rem 0 0.8rem;
  color: #2c2420;
}

.post-content blockquote {
  border-left: 3px solid #d4a882;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #7a6b5d;
}

.post-content hr {
  border: none;
  height: 1px;
  background: #e8dfd4;
  margin: 3rem auto;
  max-width: 120px;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.post-content a {
  color: #b8704a;
  text-decoration: underline;
  text-decoration-color: #d4a882;
  text-underline-offset: 2px;
}
.post-content a:hover {
  color: #944c2a;
  text-decoration-color: #944c2a;
}

.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  background: #f0ebe3;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  background: #2c2420;
  color: #e8dfd4;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Images in content — let them breathe wider */
.post-content .kg-image-card,
.post-content .kg-gallery-card {
  margin: 2.5rem -4rem;
  max-width: calc(100% + 8rem);
}
.post-content .kg-image-card img {
  width: 100%;
  border-radius: 2px;
}
.post-content .kg-image-card figcaption,
.post-content .kg-gallery-card figcaption {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0 4rem;
}

/* Gallery — responsive grid */
.post-content .kg-gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}
.post-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

/* --- Post Footer --- */
.post-footer {
  max-width: 680px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #e8dfd4;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-tag-link {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border: 1px solid #e8dfd4;
  border-radius: 2px;
}
.post-tag-link:hover {
  color: #b8704a;
  border-color: #d4a882;
}

/* --- Post Nav --- */
.post-nav {
  max-width: 680px;
  margin: 2rem auto 0;
}

.post-nav-link {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
}

.post-nav-label {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.3rem;
}

.post-nav-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: #2c2420;
  display: block;
}
.post-nav-link:hover .post-nav-title {
  color: #b8704a;
}

/* --- Page --- */
.page-full .post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-full .post-title {
  font-size: 2.4rem;
}

/* --- Footer --- */
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.site-footer-inner {
  border-top: 1px solid #e8dfd4;
  padding-top: 2rem;
  text-align: center;
}

.footer-credit {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  color: #7a6b5d;
  letter-spacing: 0.04em;
}

/* --- Pagination --- */
.pagination {
  max-width: 680px;
  margin: 4rem auto 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.pagination a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.78rem;
  color: #7a6b5d;
  letter-spacing: 0.04em;
}
.pagination a:hover {
  color: #b8704a;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  
  .site-header-inner {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .site-nav { gap: 1.5rem; }
  
  .post-title { font-size: 2rem; }
  .post-card-title { font-size: 1.5rem; }
  
  .post-hero-image {
    margin: 0 -1rem 2rem;
    max-width: calc(100% + 2rem);
  }
  
  .post-content .kg-image-card,
  .post-content .kg-gallery-card {
    margin: 2rem -1rem;
    max-width: calc(100% + 2rem);
  }
  .post-content .kg-image-card figcaption,
  .post-content .kg-gallery-card figcaption {
    padding: 0 1rem;
  }
  
  .site-main { padding: 0 1rem; }
  .site-header { padding: 2rem 1rem; }
  .site-footer { padding: 2rem 1rem; }
}

@media (min-width: 1000px) {
  .post-feed {
    grid-template-columns: 1fr;
  }
  
  /* Alternate layout: image posts get larger treatment */
  .post-card--with-image:first-child .post-card-image {
    aspect-ratio: 16 / 8;
  }
}

/* --- Ghost-specific overrides --- */
.gh-portal-triggerbtn-iframe {
  display: none !important;
}

/* Clean up Ghost's default navigation */
.site-nav .nav li {
  list-style: none;
}
.site-nav .nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.site-nav .nav a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.78rem;
  color: #7a6b5d;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.site-nav .nav a:hover {
  color: #b8704a;
}
