
/* === Base Typography & Layout === */
:root {
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: radial-gradient(circle at top, #ffffff 0, #f5f5f7 45%, #eef2ff 100%);
  color: var(--text);
  line-height: 1.7;
}

/* Links & Buttons */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* === Shell === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(245, 245, 247, 0.9);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 0.8rem;
  font-weight: 600;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
  border-bottom-color: rgba(148, 163, 184, 0.5);
}

.nav-cta {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text);
}

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

/* Mobile tweaks */
@media (max-width: 720px) {
  .site-header-inner {
    padding-inline: 1.1rem;
  }
  .site-nav {
    gap: 0.9rem;
    font-size: 0.85rem;
  }
  .nav-hide-mobile {
    display: none;
  }
}

/* Sections */
.section {
  padding: 4.5rem 1.5rem;
}

.section-alt {
  background: rgba(255, 255, 255, 0.85);
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 2vw + 1rem, 2rem);
  margin-bottom: 0.6rem;
}

.section-description {
  font-size: 0.98rem;
  color: var(--muted);
}

/* === Hero === */
.hero {
  padding-top: 4rem;
  padding-bottom: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 3rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.hero-title {
  font-size: clamp(2rem, 3vw + 1rem, 2.7rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.hero-highlight {
  background: linear-gradient(120deg, #2563eb 0%, #22c55e 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 30rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: #111827;
  color: #f9fafb;
}

.btn-primary:hover {
  background: #020617;
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--muted);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-panel-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hero-panel-items {
  display: grid;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.hero-panel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-panel-label {
  color: var(--muted);
}

.hero-panel-value {
  font-weight: 500;
}

.hero-panel-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
}

@media (max-width: 850px) {
  .hero {
    padding-top: 3rem;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
  }
}

/* === Cards / Grids === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.2rem;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header {
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-body {
  font-size: 0.9rem;
  color: var(--muted);
}

.card-tags {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.tag {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
}

.tag-soft {
  background: #e0f2fe;
  color: #0369a1;
}

.tag-green {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* === Writing preview === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.blog-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Single blog index page */
.blog-index-intro {
  max-width: 640px;
  margin-bottom: 2.4rem;
}

.blog-index-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.3fr);
  gap: 2rem;
}

.blog-index-main {
  display: grid;
  gap: 1.4rem;
}

.blog-index-card {
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: var(--bg-alt);
}

.blog-index-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.blog-index-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.blog-index-card a.read-link {
  font-size: 0.85rem;
  color: var(--accent);
}

.blog-index-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Blog sidebar */
.blog-sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: flex-start;
}

.blog-sidebar-inner {
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 231, 235, 0.95);
  font-size: 0.86rem;
  color: var(--muted);
}

.blog-sidebar-inner h4 {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.blog-sidebar-inner ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.blog-sidebar-inner li + li {
  margin-top: 0.3rem;
}

.blog-sidebar-inner a {
  color: var(--accent);
  font-size: 0.84rem;
}

@media (max-width: 880px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .blog-index-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .blog-sidebar {
    position: static;
  }
}

/* === Article Page === */
.article-page {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.article-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.article-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.article-title {
  font-size: clamp(1.8rem, 2.4vw + 1rem, 2.3rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.98rem;
  color: #111827;
}

.article-body h2,
.article-body h3 {
  margin-top: 2.1rem;
  margin-bottom: 0.8rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.1rem;
  padding-left: 1.2rem;
}

.article-body li + li {
  margin-top: 0.25rem;
}

.article-body pre {
  width: 100%;
  overflow-x: auto;
  font-size: 0.9rem;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  margin: 1.2rem 0;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

/* === About / Essay === */
.essay {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: #111827;
}

.essay p {
  margin-bottom: 1rem;
}

.essay span.highlight {
  color: var(--accent);
}

.essay-signoff {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* === Contact === */
.contact-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.6rem 1.7rem;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.contact-card p {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.contact-chip {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  font-size: 0.78rem;
  color: #4b5563;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  padding: 1.4rem 1.5rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
}

.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Utility */
.muted {
  color: var(--muted);
}
