/*
 * Clean Lanyon theme
 * Updated for header navigation instead of sidebar
 */

/* Global resets */
html,
body {
  overflow-x: hidden;
}

html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Homepage content styling */
.container.content p {
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #374151;
}

/* Homepage card styling - only apply when there's no .page or .post element inside */
.container.content:not(:has(.page)):not(:has(.post)) {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 2rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
  margin-top: 0.5rem !important;
}

@media (max-width: 48em) {
  .container.content:not(:has(.page)):not(:has(.post)) {
    padding: 1.5rem !important;
    margin-top: 0 !important;
    margin-left: 1rem !important;
    margin-right: 1rem !important;
  }
}

h1 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.025em;
}

h2, h3, h4, h5, h6 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: -0.02em;
}

/* Layout */
body {
  position: relative;
  width: 100%;
}

/* Container */
.container {
  max-width: 32rem;
}
@media (min-width: 38em) {
  .container {
    max-width: 36rem;
  }
}
@media (min-width: 56em) {
  .container {
    max-width: 42rem;
  }
}

/* Masthead - remove border by default */
.masthead {
  padding-top:    2rem;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
  border-bottom: none;
}

/* Reduce space between navigation and content on homepage only */
.container.content:not(:has(.page)):not(:has(.post)) {
  margin-top: -1.5rem !important;
}

/* Add masthead border back when there's a .page element anywhere on the page */
.page {
  --has-page: true;
}

.container.content .page ~ * {
  --has-page: true;
}

/* Add masthead border back on pages and blog posts */
html:has(.page) .masthead,
html:has(.post) .masthead {
  border-bottom: 1px solid #e5e7eb !important;
}


.masthead-nav {
  margin-top: 1rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

@media (min-width: 48em) {
  .masthead-nav {
    margin-top: 1rem;
  }
}


.nav-item {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease-in-out;
}

.nav-item:hover,
.nav-item:focus {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  text-decoration: none;
}

.nav-item.active {
  color: #1f2937;
  border-bottom-color: #1f2937;
  font-weight: 600;
}

.masthead-title {
  margin-top: 0;
  margin-bottom: 0;
  color: #1f2937;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 800;
}

.title-with-photo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  object-fit: cover;
  flex-shrink: 0;
}

.title-text {
  flex: 1;
}

.masthead-title a {
  color: #1f2937;
  font-weight: 800;
}

.masthead-title small {
  font-size: 50%;
  font-weight: 400;
  color: #6b7280;
  letter-spacing: 0;
  font-family: "Inter", sans-serif;
}

@media (min-width: 48em) {
  .masthead-title small {
    font-size: 55%;
    color: #6b7280;
    letter-spacing: 0;
  }
}

@media (max-width: 48em) {
  .masthead-nav {
    gap: 1.5rem;
  }

  .nav-item {
    font-size: 0.9rem;
  }

  .masthead-title {
    font-size: 1.9rem;
  }

  .masthead-title small {
    font-size: 50%;
  }
}

@media (max-width: 375px) {
  .masthead-title {
    font-size: 1.9rem;
  }

  .masthead-title small {
    font-size: 50%;
  }
}

/* Posts and pages */
.page,
.post {
  margin-bottom: 4em;
}

.page-title,
.post-title,
.post-title a {
  color: #1f2937;
}
.page-title,
.post-title {
  margin-top: 0;
}

.post-date {
  display: block;
  margin-top: -.5rem;
  margin-bottom: 1rem;
  color: #6b7280;
}

/* Related posts */
.related {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid #f3f4f6;
}

.related h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #1f2937;
  font-weight: 600;
}

/* Force related posts to use same font as blog index */
.related ul.posts,
.related ul.posts li,
.related ul.posts li a {
  font-family: "Crimson Text", Georgia, serif !important;
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
}

.related ul.posts li a {
  color: #3b82f6 !important;
  text-decoration: none !important;
  transition: color 0.15s ease-in-out !important;
}

.related ul.posts li a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 2px !important;
}

/* Pagination */
.pagination {
  overflow: hidden;
  margin-left: -1rem;
  margin-right: -1rem;
  font-family: "Inter", sans-serif;
  color: #6b7280;
  text-align: center;
}

.pagination-item {
  display: block;
  padding: 1rem;
  border: 1px solid #f3f4f6;
}
.pagination-item:first-child {
  margin-bottom: -1px;
}

a.pagination-item:hover {
  background-color: #f9fafb;
}

@media (min-width: 30em) {
  .pagination {
    margin: 3rem 0;
  }
  .pagination-item {
    float: left;
    width: 50%;
  }
  .pagination-item:first-child {
    margin-bottom: 0;
    border-top-left-radius:    4px;
    border-bottom-left-radius: 4px;
  }
  .pagination-item:last-child {
    margin-left: -1px;
    border-top-right-radius:    4px;
    border-bottom-right-radius: 4px;
  }
}

/* Custom styles */
.social-icons img {
  display: inline;
  margin: 0;
}

ul.posts {
  padding-inline-start: 0;
}

ul.posts li {
  margin-bottom: 0.25rem;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

ul.posts li a {
  color: #3b82f6;
  text-decoration: none;
  font-family: "Crimson Text", Georgia, serif;
  transition: color 0.15s ease-in-out;
}

ul.posts li a:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

ul.posts li small {
  color: #6b7280;
  font-size: 0.875rem;
  font-family: "Crimson Text", Georgia, serif;
}

/* Blockquotes and quotes styling */
.post blockquote, .page blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0 8px 8px 0;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #374151;
  font-style: italic;
  position: relative;
}

.post blockquote::before, .page blockquote::before {
  content: """;
  font-size: 3rem;
  color: #3b82f6;
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  opacity: 0.3;
  font-family: Georgia, serif;
}

.post blockquote p, .page blockquote p {
  margin: 0;
  font-size: 1.125rem;
}

.post blockquote p:last-child, .page blockquote p:last-child {
  margin-bottom: 0;
}

/* Emphasis styling */
.post em, .page em {
  font-style: italic;
  color: #1f2937;
  font-weight: 500;
}

.post strong, .page strong {
  font-weight: 700;
  color: #1f2937;
}

/* Blog post content styling */
.post ul, .page ul {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.post li, .page li {
  margin-bottom: 0.5rem;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.5;
  color: #374151;
}

.post ol, .page ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.post ol li, .page ol li {
  margin-bottom: 0.5rem;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.5;
  color: #374151;
}

.not-found {
  font-size: 2rem;
}

.not-found h2 {
  font-size: 5rem !important;
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid #f3f4f6;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-social a {
  transition: all 0.15s ease-in-out;
  color: #4b5563;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.footer-social a:hover {
  transform: translateY(-2px);
  color: #1f2937;
  background-color: #f3f4f6;
}

.footer-social svg {
  width: 24px;
  height: 24px;
  display: block;
}

.footer-copyright {
  margin-top: 1rem;
  margin-bottom: 0;
  
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
}