/* ============================================================
   Ricardo Torres — Cloud Resume Challenge Blog
   Styles matching the existing resume site aesthetic
   ============================================================ */

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

body {
   font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
   max-width: 1000px;
   margin: 0 auto;
   padding: 0;
   color: #111;
   line-height: 1.6;
   background-color: #d3caca;
   letter-spacing: -0.01em;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
   font-weight: 700;
   margin: 0 0 0.5em 0;
   letter-spacing: -0.03em;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

h2.section_header {
   font-size: 2rem;
   margin-top: 3rem;
   margin-bottom: 1.5rem;
   padding-bottom: 0.5rem;
   border-bottom: 4px solid #c49908;
}

/* --- Navigation --- */
.site-nav {
   background-color: #fff;
   border-bottom: 1px solid #e0d8d0;
   padding: 1rem 2rem;
   position: sticky;
   top: 0;
   z-index: 100;
}

.nav-inner {
   max-width: 1000px;
   margin: 0 auto;
   display: flex;
   align-items: center;
   justify-content: space-between;
}

.nav-brand {
   font-weight: 700;
   font-size: 1.1rem;
   color: #111;
   text-decoration: none;
   letter-spacing: -0.02em;
}

.nav-brand:hover {
   color: #c49908;
}

.nav-links {
   list-style: none;
   margin: 0;
   padding: 0;
   display: flex;
   gap: 1.5rem;
}

.nav-links a {
   color: #555;
   text-decoration: none;
   font-size: 0.9rem;
   font-weight: 500;
   transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
   color: #111;
}

/* --- Main Content --- */
.site-content {
   padding: 3rem 2rem 2rem;
}

/* --- Footer --- */
.site-footer {
   padding: 2rem;
   text-align: center;
   color: #777;
   font-size: 0.85rem;
   border-top: 1px solid #e0d8d0;
   background-color: rgba(255, 255, 255, 0.5);
}

/* --- Blog Listing Page --- */
.blog-header {
   margin-bottom: 2.5rem;
}

.blog-header p {
   color: #555;
   font-size: 1.1rem;
   max-width: 60ch;
}

/* Post cards */
.post-list {
   list-style: none;
   padding: 0;
   margin: 0;
}

.post-card {
   background: #fff;
   border: 1px solid #e0d8d0;
   border-radius: 4px;
   padding: 1.5rem 2rem;
   margin-bottom: 1.5rem;
   transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
   box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
   transform: translateY(-2px);
}

.post-card h2 {
   font-size: 1.5rem;
   margin-bottom: 0.5rem;
}

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

.post-card h2 a:hover {
   color: #c49908;
}

.post-card .post-card-meta {
   color: #777;
   font-size: 0.85rem;
   margin-bottom: 0.75rem;
}

.post-card .post-card-excerpt {
   color: #555;
   font-size: 0.95rem;
   line-height: 1.6;
   max-width: 70ch;
}

.post-card .post-card-tags {
   margin-top: 0.75rem;
}

.post-card .post-card-tags a {
   display: inline-block;
   background: #f5f0eb;
   color: #888;
   font-size: 0.75rem;
   font-weight: 600;
   padding: 0.2rem 0.6rem;
   border-radius: 3px;
   text-decoration: none;
   margin-right: 0.4rem;
   margin-bottom: 0.3rem;
}

/* --- Post Page --- */
.post {
   max-width: 72ch;
   margin: 0 auto;
}

.post-header {
   margin-bottom: 2.5rem;
   padding-bottom: 1.5rem;
   border-bottom: 1px solid #e0d8d0;
}

.post-header h1 {
   font-size: 2.4rem;
   line-height: 1.2;
}

.post-meta {
   color: #777;
   font-size: 0.9rem;
   margin-top: 0.5rem;
}

.post-tags a {
   display: inline-block;
   background: #f5f0eb;
   color: #888;
   font-size: 0.75rem;
   font-weight: 600;
   padding: 0.2rem 0.6rem;
   border-radius: 3px;
   text-decoration: none;
   margin-right: 0.3rem;
   margin-top: 0.5rem;
}

.post-body {
   color: #333;
}

.post-body h2 {
   margin-top: 2.5rem;
   margin-bottom: 1rem;
}

.post-body h3 {
   margin-top: 2rem;
   margin-bottom: 0.75rem;
}

.post-body p {
   margin-bottom: 1.25rem;
   max-width: 72ch;
}

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

.post-body li {
   margin-bottom: 0.5rem;
}

.post-body li::marker {
   color: #c49908;
}

.post-body code {
   background: #f5f0eb;
   padding: 0.15em 0.4em;
   border-radius: 3px;
   font-size: 0.9em;
   font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.post-body pre {
   background: #1e1e1e;
   color: #d4d4d4;
   padding: 1rem 1.5rem;
   border-radius: 4px;
   overflow-x: auto;
   margin-bottom: 1.5rem;
   font-size: 0.85rem;
   line-height: 1.6;
}

.post-body pre code {
   background: none;
   color: inherit;
   padding: 0;
}

.post-body blockquote {
   border-left: 3px solid #c49908;
   padding-left: 1rem;
   margin-left: 0;
   color: #555;
   font-style: italic;
}

.post-body a {
   color: #c49908;
   text-decoration: underline;
}

.post-body a:hover {
   color: #a07e06;
}

.post-body img {
   max-width: 100%;
   height: auto;
   border-radius: 4px;
   margin-bottom: 1.5rem;
}

.post-body table {
   width: 100%;
   border-collapse: collapse;
   margin-bottom: 1.5rem;
}

.post-body th,
.post-body td {
   border: 1px solid #e0d8d0;
   padding: 0.5rem 1rem;
   text-align: left;
}

.post-body th {
   background: #f5f0eb;
   font-weight: 600;
}

/* --- Post Footer --- */
.post-footer {
   margin-top: 3rem;
   padding-top: 1.5rem;
   border-top: 1px solid #e0d8d0;
}

.back-link {
   color: #555;
   text-decoration: none;
   font-size: 0.95rem;
   font-weight: 500;
   transition: color 0.2s ease;
}

.back-link:hover {
   color: #c49908;
}

/* --- Buttons --- */
button {
   background-color: #000;
   color: white;
   border: none;
   padding: 0.8rem 1.5rem;
   border-radius: 0;
   cursor: pointer;
   font-size: 0.9rem;
   font-weight: 500;
   letter-spacing: 0.02em;
   transition: all 0.2s ease;
}

button:hover {
   background-color: #333;
   transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
   body {
      padding: 0;
   }

   .site-nav {
      padding: 0.75rem 1rem;
   }

   .nav-inner {
      flex-direction: column;
      gap: 0.5rem;
   }

   .site-content {
      padding: 2rem 1.5rem 1.5rem;
   }

   h1 { font-size: 2rem; }
   h2 { font-size: 1.5rem; }

   .post-header h1 {
      font-size: 1.8rem;
   }

   .post-card {
      padding: 1.25rem;
   }
}

/* --- Print --- */
@media print {
   body {
      padding: 0;
      font-size: 11pt;
      background: #fff;
   }

   .site-nav,
   .site-footer {
      display: none;
   }

   .post-card {
      break-inside: avoid;
      border: none;
      box-shadow: none;
   }
}
