/* ==========================================================================
   Jack Senechal - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.125rem;
  color: #333;
  background-color: #fff;
}

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

a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #1d4ed8;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

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

h2 {
  font-size: 1.875rem;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1.5em;
  line-height: 1.75;
}

strong {
  font-weight: 600;
  color: #111;
}

em {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 960px;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.15s ease;
}

.nav-menu a:hover {
  opacity: 0.6;
}

.nav-social {
  display: flex;
  gap: 1rem;
}

.nav-social a {
  color: #333;
  text-decoration: none;
  font-size: 1.25rem;
  transition: opacity 0.15s ease;
}

.nav-social a:hover {
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.site-footer .container {
  max-width: 960px;
}

.site-footer a {
  color: #6b7280;
}

/* --------------------------------------------------------------------------
   Page Content (About, Projects, etc.)
   -------------------------------------------------------------------------- */
.page {
  padding: 4rem 0;
}

.page__header {
  margin-bottom: 2rem;
}

.page__title {
  font-size: 2.5rem;
  margin-bottom: 0;
}

.page__content p {
  color: #374151;
}

.page__content a {
  color: #2563eb;
}

/* Profile image on about page */
.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem;
}

/* --------------------------------------------------------------------------
   Post (Blog articles)
   -------------------------------------------------------------------------- */
.post {
  padding: 4rem 0;
}

.post__date {
  font-size: 0.9rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.post__title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.post__content {
  color: #374151;
}

.post__content h2 {
  font-size: 1.875rem;
  margin-top: 2.5em;
}

.post__content h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 2.5em;
}

/* Post subtitle (h3 right after title) */
.post__content > h3:first-child {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 2em;
}

.post__content h4 {
  font-size: 1.25rem;
}

.post__content ul,
.post__content ol {
  margin: 1.5em 0;
  padding-left: 1.75em;
  list-style: disc;
}

.post__content ol {
  list-style: decimal;
}

.post__content li {
  margin-bottom: 0.5em;
  line-height: 1.65;
}

.post__content li::marker {
  color: #6b7280;
}

.post__content blockquote {
  margin: 2em 0;
  padding: 1em 1.5em;
  border-left: 4px solid #3b82f6;
  background-color: #f8fafc;
  font-style: italic;
  color: #475569;
}

.post__content blockquote p {
  margin-bottom: 0.5em;
  font-size: 1.1rem;
}

.post__content blockquote p:last-child {
  margin-bottom: 0;
}

.post__content code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875em;
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  color: #be185d;
}

.post__content pre {
  margin: 1.75em 0;
  padding: 1.25em 1.5em;
  background-color: #1f2937;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
  color: #e5e7eb;
}

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

.post__content hr {
  margin: 3em 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.post__content img {
  margin: 2em auto;
  border-radius: 8px;
}

.post__content iframe,
.post__content video {
  max-width: 100%;
  margin: 2em auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Home Page
   -------------------------------------------------------------------------- */
.home {
  padding: 4rem 0;
}

/* Sun icon */
.sun-icon {
  text-align: center;
  margin-bottom: 1rem;
}

.sun-icon img {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.sun-icon a:hover img {
  opacity: 0.5;
}

.home__title {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
}

.post-list {
  margin-top: 3rem;
}

.post-list__item {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.post-list__item:first-child {
  padding-top: 0;
}

.post-list__date {
  font-size: 0.9rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-list__title {
  font-size: 1.75rem;
  margin: 0.25em 0 0.5em;
}

.post-list__title a {
  color: #111;
  text-decoration: none;
}

.post-list__title a:hover {
  opacity: 0.6;
}

.post-list__excerpt {
  color: #374151;
  line-height: 1.7;
}

.post-list__excerpt h3 {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: #9ca3af;
  margin: 0 0 0.75em 0;
  line-height: 1.5;
}

/* Shared subtitle/description style */
.subtitle {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 0.75em 0;
}

.post-list__subtitle {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: #9ca3af;
  margin: 0 0 0.75em 0;
  line-height: 1.5;
}

.post-list__excerpt p {
  margin-bottom: 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.pagination__list {
  display: flex;
  gap: 0.5rem;
}

.pagination__list a,
.pagination__list span {
  padding: 0.25rem 0.5rem;
}

.pagination__list .current {
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   Projects Page
   -------------------------------------------------------------------------- */
.project-list {
  margin-top: 2rem;
}

.project-list__item {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.project-list__item:first-child {
  padding-top: 0;
}

.project-list__title {
  font-size: 1.5rem;
  margin: 0 0 0.5em;
}

.project-list__title a {
  color: #111;
  text-decoration: none;
}

.project-list__title a:hover {
  text-decoration: underline;
}

.project-list__description {
  color: #374151;
  margin-bottom: 0.5em;
}

.project-list__description p {
  margin-bottom: 0.75em;
}

.project-list__description p:last-child {
  margin-bottom: 0;
}

.project-list__tech {
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.75em;
}

/* --------------------------------------------------------------------------
   Recipes Page
   -------------------------------------------------------------------------- */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.recipe-card {
  transition: opacity 0.15s ease;
}

.recipe-card:hover {
  opacity: 0.7;
}

.recipe-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.recipe-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.recipe-card__title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.recipe-card__description {
  color: #6b7280;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.recipe-card__meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Recipe Detail Page
   -------------------------------------------------------------------------- */
.recipe {
  padding: 4rem 0;
}

.recipe__header {
  margin-bottom: 2rem;
}

.recipe__title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.recipe__description {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.recipe__meta {
  font-size: 0.95rem;
  color: #6b7280;
}

.recipe__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
}

.recipe__content {
  color: #374151;
  margin-bottom: 2rem;
}

.recipe__section {
  margin-bottom: 2rem;
}

.recipe__section h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.recipe__section ul,
.recipe__section ol {
  padding-left: 1.5em;
  list-style: disc;
}

.recipe__section ol {
  list-style: decimal;
}

.recipe__section li {
  margin-bottom: 0.75em;
  line-height: 1.6;
}

.recipe__notes ul {
  list-style: none;
  padding-left: 0;
}

.recipe__notes li {
  margin-bottom: 1rem;
  padding-left: 1.5em;
  position: relative;
}

.recipe__notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6b7280;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }

  h1, .page__title, .post__title {
    font-size: 2rem;
  }

  h2, .post__content h2 {
    font-size: 1.5rem;
  }

  .home__title {
    font-size: 2.25rem;
  }

  .post-list__title {
    font-size: 1.5rem;
  }

  .site-header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page, .post, .home {
    padding: 2rem 0;
  }
}
