/*
  A modern, clean, and simple blog post design.
  Inspired by the minimalist aesthetic of top tech companies.
*/

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #555555;
  --border: #e5e5e5;
  --accent: #007aff;
  --accent-light: #f0f7ff;
  --code-bg: #f8f8f8;
  --code-text: #333333;
  --card-bg: #fdfdfd;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  /* Offset for fixed header so top content doesn’t sit under it */
  padding-top: 56px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Unstyled link for byline company block */
.company-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.company-link:hover {
  text-decoration: none;
}

.container {
  /* dialed back ~5% from 103ch/96% */
  width: min(98ch, 94%);
  margin-inline: auto;
}

header.hero {
  padding: 64px 0 32px;
  text-align: center;
}

/* Make blog titles clickable back to homepage without changing style */
.hero h1 a {
  color: inherit;
  text-decoration: none;
}

.hero h1 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero .pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.5rem);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero p.lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 1vw + 1rem, 1.25rem);
  margin: 0;
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.meta .chip {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

.meta .chip a {
  text-decoration: none;
  color: inherit;
}

.byline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.byline .author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.byline .company-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.company-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

@keyframes move-particles {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px 20px;
  background: hsla(0, 0%, 96%, 0.7);
  backdrop-filter: saturate(180%) blur(5px);
  -webkit-backdrop-filter: saturate(180%) blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  transition: top 0.3s;
  overflow: hidden;
}

.sticky-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 10px 10px;
  animation: move-particles 10s linear infinite;
  z-index: -1;
  opacity: 0.5;
}

.sticky-header .logo { height: 26px; opacity: 0.9; }

/* Nav styling (to match homepage) */
nav { display: flex; gap: 18px; align-items: center; }

.nav-link { color: var(--text); text-decoration: none; font-weight: 500; transition: color 0.2s ease; line-height: 26px; }

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

@media (max-width: 768px) {
  nav { display: none; }
}

main {
  padding-top: 10px; /* Add padding to account for sticky header */
  padding-bottom: 64px;
}

section {
  padding: 24px 0;
}

section h2 {
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2.2rem);
  margin: 32px 0 12px;
  line-height: 1.2;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}



.intro-card {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.intro-card p {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--muted);
}

.intro-card p:last-child {
  margin-bottom: 0;
}

.intro-card em {
    font-weight: 600;
    color: var(--accent);
}

.dual-tldr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.tldr-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.tldr-tech {
  border-left: 4px solid var(--accent);
}

.tldr-business {
  border-left: 4px solid #10b981;
}

.tldr-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tldr-tech .tldr-header {
  color: var(--accent);
}

.tldr-business .tldr-header {
  color: #10b981;
}

.tldr-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.non-techie-hint {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.non-techie-hint .hint-header {
  font-weight: 600;
  color: #0ea5e9;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 700px) {
  .dual-tldr {
    grid-template-columns: 1fr;
  }
}

/* Center content better */
.hero {
  text-align: center;
  max-width: none;
}

.hero .container {
  text-align: center;
}

.story-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  font-style: italic;
}

.story-card p {
  margin: 0 0 16px;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.reference-links {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.reference-links p {
  margin: 0;
  color: var(--muted);
}

.reference-links a {
  color: var(--accent);
  font-weight: 500;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}


.sub {
  color: var(--muted);
  margin-top: 0;
  font-size: 1.05rem;
}

.hr {
  height: 1px;
  background-color: var(--border);
  border: 0;
  margin: 48px 0;
}

.grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

.grid-item .kicker {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.grid-item ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.grid-item ul li {
  margin-bottom: 8px;
}

/* ... existing code ... */
.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.blog-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 32px 0;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-image:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.placeholder i {
  font-size: 2rem;
  color: var(--border-dark);
}
/* ... existing code ... */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table thead {
  background: var(--code-bg);
}

.table th {
  font-weight: 600;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

/* New Checklist Style */
.checklist {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.checklist-item {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.checklist-item .icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 2px;
}

.checklist-item .text .title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

.checklist-item .text .description {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 32px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg);
  font-weight: 600;
  font-size: 1rem;
}

.btn.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

/* Subtle translucent pill button — ideal for headers */
.btn.ghost { padding: 6px 12px; border-radius: 999px; line-height: 1; font-size: 0.9rem; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); backdrop-filter: saturate(180%) blur(6px); -webkit-backdrop-filter: saturate(180%) blur(6px); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 36%, transparent); text-decoration: none; }

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

footer {
  padding: 32px 0 48px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.float-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.mono {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background-color: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--code-text);
  border: 1px solid var(--border);
}
