/* ==========================================================================
   emmettb.org — Minimalist Semantic Stylesheet
   Replaces Tailwind CDN with lightweight, zero-JS semantic styles.
   Inside <article class="prose">, plain HTML tags (<h2>, <p>, <ul>, <table>,
   <img>) are styled automatically with no classes needed.
   ========================================================================== */

:root {
  --bg-page: #f5f5f4;        /* stone-100 */
  --bg-surface: #fafaf9;     /* stone-50 */
  --bg-card: #f5f5f4;        /* stone-100 */
  --bg-card-hover: #e7e5e4;  /* stone-200 */
  --bg-header: #ffffff;
  --bg-footer: #1f2937;      /* gray-800 */
  --bg-table-head: #374151;  /* gray-700 */
  --text-main: #1f2937;      /* gray-800 */
  --text-body: #374151;      /* gray-700 */
  --text-muted: #57534e;     /* stone-600 */
  --border-subtle: #d6d3d1;  /* stone-300 */
  --border-table: #e5e7eb;   /* gray-200 */
  --accent-dark: #1f2937;
  --radius-lg: 0.5rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 14px 22px -4px rgba(0, 0, 0, 0.11), 0 6px 8px -3px rgba(0, 0, 0, 0.05);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.65;
}

/* ==========================================================================
   Layout & Containers
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

main.container {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  main.container {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }
}

.surface {
  background-color: var(--bg-surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .surface {
    padding: 2.5rem 3rem;
  }
}

.surface-narrow {
  max-width: 56rem; /* 896px — matches max-w-4xl */
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Header & Top Navigation
   ========================================================================== */

.site-header {
  background-color: var(--bg-header);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.75rem;
}

.nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 600;
  border-bottom-color: var(--accent-dark);
}

/* ==========================================================================
   Homepage Hero
   ========================================================================== */

.hero {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 0;
}

.hero-avatar {
  width: 16rem;
  height: 16rem;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem auto;
  border: 1px solid #6b7280;
  box-shadow: var(--shadow-md);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.hero-bio {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-body);
  max-width: 40rem;
  margin: 0 auto;
}

/* ==========================================================================
   Section Headers & Typography
   ========================================================================== */

.page-title {
  font-size: clamp(1.85rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.page-subtitle {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 2rem 0;
}

.page-title + .post-grid,
.page-title + .resume-stack {
  margin-top: 2rem;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-body);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
}

.section-heading:first-child {
  margin-top: 0;
}

/* ==========================================================================
   Post Cards & Grids (Blog, Marketing Math, Gym Stuff)
   ========================================================================== */

.post-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

a.post-card:hover,
.post-card-Interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.post-card h3,
.post-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 0.65rem 0;
  line-height: 1.35;
}

.post-card p {
  font-size: 0.925rem;
  color: var(--text-body);
  margin: 0 0 0.85rem 0;
}

.post-card-footer {
  margin-top: auto;
  padding-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

a.post-card:hover .post-card-footer,
.post-card a.read-more:hover {
  color: var(--text-main);
}

.read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: #e7e5e4;
  color: #44403c;
}

.badge-draft {
  background-color: #fee2e2;
  color: #991b1b;
}

/* ==========================================================================
   Resumé Layout (Compact & Clean)
   ========================================================================== */

.resume-surface {
  max-width: 50rem; /* 800px — removes excess side whitespace */
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.75rem;
}

@media (min-width: 768px) {
  .resume-surface {
    padding: 2rem 2.5rem;
  }
}

.resume-surface .page-title {
  margin-bottom: 1.1rem;
}

.resume-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.resume-section .section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1.5px solid var(--border-subtle);
}

.resume-item {
  margin-bottom: 0.85rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.resume-row h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.resume-org {
  font-weight: 500;
  color: var(--text-muted);
}

.resume-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Multi-role progression inside a single company (e.g., Google) */
.resume-roles {
  margin: 0.15rem 0 0.25rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.resume-role-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.resume-role-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-body);
}

.resume-list {
  margin: 0.25rem 0 0 0;
  padding-left: 1.25rem;
  color: var(--text-body);
  font-size: 0.94rem;
  line-height: 1.55;
}

.resume-list li {
  margin-bottom: 0.25rem;
}

.resume-list li:last-child {
  margin-bottom: 0;
}

.inline-link {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-left: 0.3rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.inline-link:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Article / Blog Post Typography (.prose)
   Write standard HTML inside <article class="prose"> with zero classes!
   ========================================================================== */

.back-link {
  display: inline-block;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text-main);
}

.prose h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.prose .post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
}

.prose .post-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: underline;
  margin: -1rem 0 1.5rem 0;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 0.75rem 0;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.75rem 0 0.65rem 0;
}

.prose p {
  margin: 0 0 1rem 0;
  color: var(--text-body);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose a {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--text-main);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 1.5rem auto;
}

.prose img.img-medium {
  width: 65%;
}

@media (max-width: 640px) {
  .prose img.img-medium {
    width: 100%;
  }
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 2rem 0;
}

.prose .formula {
  text-align: center;
  font-weight: 600;
  color: #166534; /* green-800 */
  background-color: var(--bg-card);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  margin: 1.25rem 0;
}

.prose .note {
  color: var(--text-muted);
  font-style: italic;
}

/* Automatic Responsive Tables inside .prose */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.prose thead {
  background-color: var(--bg-table-head);
  color: #ffffff;
}

.prose th {
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.prose td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-table);
  color: var(--text-body);
  vertical-align: top;
}

.prose tbody tr:nth-child(odd) {
  background-color: var(--bg-card);
}

.prose tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.prose tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--bg-footer);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 2rem;
  font-size: 0.925rem;
}

.site-footer p {
  margin: 0;
}
