/* Global Styles - Minimal & Clean */

/* Mobile responsive */
@media (max-width: 640px) {
  /* Remove top padding from hero section on mobile */
  section.mobile-divider-top > div {
    padding-top: 0 !important;
  }
}

/*
  Layout stability
  - Ensures the page always fills the viewport height (prevents blank band below content)
  - Keeps footer pinned to the bottom on short pages (like the homepage)
*/
html, body {
  height: 100%;
}

.gh-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gh-main {
  flex: 1;
}

body {
  background-color: #ffffff;
  color: #2e374e;
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  line-height: 1.6;
  font-weight: 300;
  margin: 0;
  padding: 0;
}

main, .gh-main, .gh-viewport {
  margin: 0;
  padding: 0;
}

/* Brand & Navigation Styles */
.brand-title {
  color: #4e4f43;
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  font-weight: 300;
  letter-spacing: 0.25em;
}

.nav-link {
  color: #4a5568;
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  font-weight: 300;
  letter-spacing: 0.15em;
}

/* Profile Image Circle - About Page */
.profile-image-container {
  margin-bottom: 2rem;
}

.profile-image-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}

/* About Page Centering */
.gh-article-header {
  text-align: center;
}

.gh-content {
  text-align: center;
  margin: 0 auto;
}

/* Reduce spacing around dividers in work section */
.gh-article-header + section {
  padding: 2rem !important;
}

/* Reduce paragraph top/bottom margins */
.gh-content p {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.gh-canvas {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.gh-article {
  width: 100%;
}

.gh-article-header {
  padding: 3rem 2rem;
  text-align: center;
}

.gh-article-tag {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: capitalize;
  margin-bottom: 1rem;
  color: #4a5568;
  text-decoration: underline;
  text-decoration-offset: 4px;
}

.gh-article-title {
  font-size: 2.25rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #2e374e;
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  margin-bottom: 2rem;
}

.gh-article-image {
  max-width: 70rem;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.gh-article-image img {
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.gh-content {
  padding: 4rem 2rem;
}

/* Darker borders for better visibility */
.border-light {
  border-color: #999999 !important;
}

.border-gray-400 {
  border-color: #999999 !important;
}

.section-title {
  color: #2e374e;
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  font-weight: 300;
  letter-spacing: 0.15em;
}

.post-tag {
  color: #4e4f43;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-date {
  color: #4a5568;
  font-size: 0.9rem;
}

.post-excerpt {
  color: #2e374e;
  line-height: 1.8;
}

.cta-button {
  background-color: #c67b5c;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.cta-button:hover {
  opacity: 0.85;
}

.arrow-accent {
  color: #4a5568;
}

.primary-link {
  color: #4a5568;
}

.index-number {
  color: #4a5568;
  opacity: 0.5;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-12 > * + * {
  margin-top: 3rem;
}

.underline-offset-4 {
  text-underline-offset: 4px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: Didot, 'Bodoni MT', 'Cochin', serif;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #2e374e;
}

h3 {
  color: #2e374e;
}

h3:hover {
  color: #4a5568;
}

/* Override Tailwind's group-hover:text-primary */
.group:hover h3 {
  color: #4a5568 !important;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  margin-top: 3rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #4a5568;
}

a {
  color: #4a5568;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* Tags */
.tag-color,
.post-card-tags .post-card-tag {
  color: #4e4f43 !important;
}

/* Prose Styles for Post Content */
.prose {
  color: #4a5568;
  max-width: 65ch;
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose p {
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  line-height: 1.8;
  color: #4a5568;
}

.prose h2 {
  margin-top: 2.5em;
  margin-bottom: 1em;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #2e374e;
}

.prose h3 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #2e374e;
}

.prose a {
  color: #4a5568;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover {
  opacity: 0.7;
}

.prose strong {
  font-weight: 600;
  color: #2e374e;
}

.prose em {
  font-style: italic;
}

.prose ul,
.prose ol {
  margin-top: 1.75em;
  margin-bottom: 1.75em;
  padding-left: 1.75em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  font-style: italic;
  padding-left: 1.5em;
  margin-top: 2em;
  margin-bottom: 2em;
  color: #4a5568;
  font-size: 1.125rem;
}

.prose code {
  background-color: #f5f0ea;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

.prose pre {
  background-color: #f5f0ea;
  padding: 1.5em;
  border-radius: 6px;
  overflow-x: auto;
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.9rem;
}

.prose img {
  margin-top: 3em;
  margin-bottom: 3em;
  border-radius: 4px;
  width: 100%;
  height: auto;
}

.prose hr {
  border: none;
  margin-top: 4em;
  margin-bottom: 4em;
}

.prose figcaption {
  margin-top: 1em;
  font-size: 0.875rem;
  color: #4a5568;
  text-align: center;
  font-style: italic;
}

/* Ghost Editor Content Card Styles */
.kg-width-wide {
  width: 100%;
  max-width: 85rem;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: none;
}

.kg-card {
  margin-top: 3em;
  margin-bottom: 3em;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Smooth Transitions */
.backdrop-blur-sm {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .prose {
    font-size: 1rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }
}

/* Footer Styles */
.site-footer {
  background-color: #ffffff;
  padding: 0;
  margin: 0;
}

.footer-container {
  max-width: 88rem;
  margin: 0 auto;
  padding: 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copyright {
  font-size: 0.875rem;
  color: #4a5568;
  margin: 0;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-icon {
  color: #4a5568;
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-icon:hover {
  opacity: 0.7;
}

.footer-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-search-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #4a5568;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-search-button:hover {
  opacity: 0.7;
}

.footer-search-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
  }
  
  .footer-icons {
    gap: 1.25rem;
  }
}

/* Homepage only: lowercase nav links */
.home-template .nav-link {
  text-transform: lowercase;
}

/* Homepage dividers (thin, centered, muted) */
.home-template .home-divider {
  width: 360px;
  max-width: 70%;
  height: 1px;
  background-color: rgba(46, 55, 78, 0.35);
  margin: 1.5rem auto;
}

/* Homepage: bring footer closer by preventing flex "push to bottom" */
.home-template .gh-main {
  flex: 0 !important;
}


/* Homepage layout: Keep original styling, minimal overrides */
body.home-template .gh-viewport {
  min-height: auto !important;
}

body.home-template .gh-main {
  padding: 0;
}
