/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06),
    0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08),
    0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1),
    0 4px 12px rgba(15, 23, 42, 0.06);

  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
}

/* Display headings use the serif */
h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  margin-top: 0;
  color: var(--ink);
}

h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  color: var(--ink);
}

p {
  margin-top: 0;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: min(1100px, 90%);
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ============================================================
   Header & Navigation
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-blog-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-blog-link:hover {
  color: var(--ink);
  background: var(--border-light);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent-border);
}

.btn-outline:hover {
  background: var(--accent-light);
}

.btn-light {
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
}

.btn-light:hover {
  background: var(--bg);
  color: var(--ink);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 6.5rem 0 5.5rem;
  background: linear-gradient(175deg, #ffffff 0%, var(--bg) 100%);
}

.hero-greeting {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
  line-height: 1.15;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 56ch;
}

.hero-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 1.08rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.hero-bullets li::before {
  content: "—";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 300;
  margin-top: 1px;
}

/* ============================================================
   Stats strip
   ============================================================ */
.stats-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* ============================================================
   Beliefs
   ============================================================ */
.beliefs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.belief-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.belief-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-border);
}

.belief-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.belief-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.belief-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   Projects
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 1.1rem;
  margin: 0.65rem 0 0.5rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0;
  line-height: 1.65;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* ============================================================
   Operating philosophy
   ============================================================ */
.process-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.process-left h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.6rem;
}

.process-left > p {
  color: var(--muted);
  margin-bottom: 2.25rem;
  font-size: 1.02rem;
}

.process-steps {
  padding-left: 0;
  margin: 0;
  counter-reset: steps;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.process-steps li {
  display: flex;
  gap: 1.1rem;
  counter-increment: steps;
}

.process-steps li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.process-steps li strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.process-steps li span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.process-right {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.outcome-card {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.outcome-num {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 5.5rem;
}

.outcome-label {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pull-quote {
  margin: 0.5rem 0 0;
  padding: 1.4rem 1.5rem;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.7;
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.3px;
}

/* ============================================================
   Writing list
   ============================================================ */
.writing-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
}

.writing-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.writing-item:first-child {
  border-top: 1px solid var(--border);
}

.writing-meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.writing-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s;
}

.writing-item:hover .writing-title {
  color: var(--accent);
}

.writing-arrow {
  font-size: 1rem;
  color: var(--border);
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.writing-item:hover .writing-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ============================================================
   Contact CTA
   ============================================================ */
.contact-cta {
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 5rem 4rem;
  text-align: center;
}

.contact-cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: 1rem;
}

.contact-cta p {
  color: #94a3b8;
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.footer-social a {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.footer-social a:hover {
  color: var(--ink);
}

/* ============================================================
   Blog — listing page
   ============================================================ */
.blog-header {
  padding: 5rem 0 3.5rem;
  background: linear-gradient(175deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.blog-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  margin-bottom: 0.75rem;
}

.blog-header p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 50ch;
  margin: 0;
  line-height: 1.7;
}

/* Featured post */
.featured-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 3rem 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  position: relative;
}

.featured-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.featured-post .meta {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.featured-post h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 0.85rem;
  line-height: 1.25;
}

.featured-post .excerpt {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 58ch;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.post-card .meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.post-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  line-height: 1.4;
}

.post-card p {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   Blog Post — individual article
   ============================================================ */
.post-page-header {
  padding: 5rem 0 3.5rem;
  background: linear-gradient(175deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.post-page-header .eyebrow {
  margin-bottom: 1.25rem;
}

.post-page-header h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 22ch;
  margin: 0 auto 1rem;
  line-height: 1.2;
}

.post-page-header .meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.post-body {
  max-width: 680px;
  margin: 3.5rem auto 5.5rem;
  padding: 0 1.5rem;
  font-size: 1.07rem;
  line-height: 1.82;
  color: var(--ink-2);
}

.post-body h2 {
  font-size: 1.65rem;
  margin: 3rem 0 1rem;
  color: var(--ink);
}

.post-body h3 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.75rem;
  color: var(--ink);
}

.post-body p {
  margin-bottom: 1.6rem;
}

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

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

.post-body blockquote {
  margin: 2.25rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.post-body code {
  background: var(--border-light);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.87em;
  font-family: "SF Mono", "Fira Code", "Roboto Mono", monospace;
}

.post-body pre {
  background: var(--ink);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.87em;
  margin-bottom: 1.6rem;
}

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

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .beliefs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .process-inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .writing-item {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .writing-meta {
    grid-column: 1;
    grid-row: 1;
  }

  .writing-title {
    grid-column: 1;
    grid-row: 2;
  }

  .writing-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

  .beliefs-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero-bullets li {
    font-size: 1rem;
  }

  .contact-cta {
    padding: 3.5rem 1.75rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .featured-post {
    padding: 1.5rem;
  }

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

  .writing-item {
    grid-template-columns: 1fr auto;
  }

  .writing-meta {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .writing-title {
    grid-column: 1;
    grid-row: 2;
  }

  .writing-arrow {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
}
