:root {
  --ink: #19232d;
  --muted: #5c6b78;
  --line: #dce3e8;
  --paper: #ffffff;
  --wash: #f5f7f8;
  --accent: #126b8a;
  --accent-dark: #0b4b61;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--wash); color: var(--ink); font: 400 17px/1.65 Georgia, "Times New Roman", serif; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, nav, .button, .eyebrow, .project-heading span, .project-meta, .links, .post-date, .site-footer { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.7rem, 7vw, 5.8rem); max-width: 780px; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover, a:focus { color: var(--accent-dark); }
.shell { width: min(var(--max), calc(100% - 3rem)); margin: 0 auto; }
.site-header { padding: 1.5rem 0; background: var(--wash); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.site-name { color: var(--ink); font: 700 1.05rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-decoration: none; letter-spacing: .02em; }
nav { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .9rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a:focus { color: var(--ink); }
.home { padding: 5rem 0 2rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 5rem; align-items: center; padding-bottom: 7rem; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .13em; line-height: 1.3; text-transform: uppercase; }
.lede { color: var(--muted); font-size: 1.22rem; line-height: 1.65; max-width: 720px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { border: 1px solid var(--line); border-radius: 999px; color: var(--ink); display: inline-block; font-size: .88rem; font-weight: 650; padding: .55rem 1rem; text-decoration: none; }
.button:hover, .button:focus { border-color: var(--accent); }
.button-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-primary:hover, .button-primary:focus { background: var(--accent-dark); color: #fff; }
.portrait { aspect-ratio: 1; border-radius: 50%; box-shadow: 14px 16px 0 #d8e5e8; object-fit: cover; width: 100%; }
.section { border-top: 1px solid var(--line); padding: 5.5rem 0; }
.intro-section { max-width: 760px; }
.intro-section h2 { max-width: 700px; }
.intro-section p:last-child, .section-intro { color: var(--muted); max-width: 680px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading-stacked { display: block; width: 100%; }
.section-heading-stacked > p { max-width: none; width: 100%; }
.section-heading > p { color: var(--muted); margin-bottom: .35rem; }
.project-list { display: grid; gap: 1rem; }
.project-card { background: var(--paper); border: 1px solid var(--line); display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 1.2rem; }
.project-card img { aspect-ratio: 4 / 3; background: #edf1f2; border-radius: 3px; display: block; object-fit: cover; width: 100%; }
.project-card img.project-image-logo { object-fit: contain; padding: 1.25rem; }
.project-placeholder { align-items: center; aspect-ratio: 4 / 3; background: var(--accent); border-radius: 3px; color: #fff; display: flex; font: 700 2.5rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; justify-content: center; }
.project-card-body { padding: .35rem .5rem .35rem 0; }
.project-heading { align-items: baseline; display: flex; gap: 1rem; justify-content: space-between; }
.project-heading h3 { margin-bottom: .55rem; }
.project-heading span, .project-meta, .post-date { color: var(--muted); font-size: .78rem; }
.project-card p { margin-bottom: .7rem; }
.project-meta { font-style: italic; }
.links { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; font-size: .82rem; font-weight: 650; }
.links a { text-decoration: none; }
.fun-section { background: var(--ink); color: #fff; margin: 0 calc(50% - 50vw); padding-left: max(1.5rem, calc((100vw - var(--max)) / 2)); padding-right: max(1.5rem, calc((100vw - var(--max)) / 2)); }
.fun-section .eyebrow { color: #8fd0df; }
.fun-section .section-intro { color: #c4d0d5; }
.fun-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2.5rem; }
.fun-grid > div { border-left: 1px solid #42515a; padding: 0 1.5rem; }
.fun-grid > div:first-child { border-left: 0; padding-left: 0; }
.fun-grid p { color: #c4d0d5; }
.writing-preview { padding-bottom: 7rem; }
.post-preview { align-items: center; border-top: 1px solid var(--line); color: var(--ink); display: grid; grid-template-columns: 120px 1fr 24px; gap: 1.5rem; padding: 1.2rem 0; text-decoration: none; }
.post-preview:hover strong, .post-preview:focus strong { color: var(--accent); }
.page-listing { padding: 5rem 0 8rem; }
.page-listing h1 { font-size: clamp(3rem, 8vw, 5rem); }
.post { max-width: 760px; padding: 6rem 0 8rem; }
.post h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
.post-body { font-size: 1.15rem; }
.post-body p { margin-bottom: 1.5rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; padding: 1.5rem 0; }
.site-footer a { color: var(--muted); }

@media (max-width: 720px) {
  .shell { width: min(var(--max), calc(100% - 2rem)); }
  .site-header { padding: 1.2rem 0; }
  .header-inner { align-items: flex-start; flex-direction: column; }
  nav { gap: .8rem 1rem; }
  .home { padding-top: 3.5rem; }
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 5rem; }
  .portrait { max-width: 190px; order: -1; }
  .section { padding: 4rem 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .project-card { grid-template-columns: 1fr; gap: 1.2rem; }
  .project-card img { aspect-ratio: 16 / 8; }
  .project-card-body { padding-right: 0; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .fun-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .fun-grid > div, .fun-grid > div:first-child { border-left: 0; border-top: 1px solid #42515a; padding: 1.5rem 0 0; }
  .fun-grid > div:first-child { border-top: 0; padding-top: 0; }
  .post-preview { grid-template-columns: 1fr 24px; gap: .3rem 1rem; }
  .post-date { grid-column: 1 / -1; }
}
