/* ==========================================================================
   michaelchein.com
   ========================================================================== */

:root {
  --bg: #faf8f4;
  --bg-raised: #f3efe8;
  --surface: #ffffff;
  --surface-hover: #fffdf9;
  --line: #e6e0d6;
  --text: #2b2c2e;
  --text-strong: #16181a;
  --muted: #5e5f63;
  --faint: #858279;
  --accent: #b5541c;
  --accent-soft: rgba(181, 84, 28, 0.07);
  --accent-line: rgba(181, 84, 28, 0.28);
  --on-accent: #ffffff;
  --sage: #5d8a6b;
  --shadow: 0 1px 2px rgba(60, 45, 30, 0.04), 0 4px 16px -8px rgba(60, 45, 30, 0.10);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text-strong); }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500;
  color: var(--text-strong); text-decoration: none; white-space: nowrap;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
}
.brand:hover { color: var(--accent); }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  padding: 6px 12px; border-radius: 999px;
}
.site-nav a:hover { color: var(--text-strong); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--text-strong); background: var(--surface); }
.site-nav a.nav-cta { color: var(--on-accent); background: var(--accent); font-weight: 500; }
.site-nav a.nav-cta:hover { background: var(--text-strong); color: var(--on-accent); }

@media (max-width: 720px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .site-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -6px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: 0.9rem; padding: 5px 10px; }
}
@media (max-width: 480px) { .site-nav a.nav-cta { display: none; } }

/* ---------- Buttons, pills, labels ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 500; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--text-strong); color: var(--on-accent); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent); font-size: 0.85rem; font-weight: 500;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(156,191,167,.2); }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tag-list li {
  font-size: 0.8rem; color: var(--muted);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
}

.muted { color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.page-head { padding: clamp(56px, 9vw, 96px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center;
}
.hero h1 { margin: 18px 0 18px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--text); max-width: 58ch; }
.hero .lede-2 { color: var(--muted); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-grid { grid-template-columns: 1.4fr 1fr; }
.hero-name { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 18px 0 4px; }
.hero-role {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--accent); margin: 0 0 22px;
}
.hero-photo {
  margin: 0; justify-self: center;
  width: min(100%, 360px); aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  background: #e6e5e3; border: 6px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(60, 45, 30, 0.35);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { width: 200px; justify-self: start; order: -1; }
}

/* ---------- Credentials strip ---------- */

.creds {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.creds div { background: var(--bg-raised); padding: 20px 22px; }
.creds strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--text-strong); }
.creds span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 860px) { .creds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .creds { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, transform .15s;
}
.card h3 { margin: 0; }
.card p { color: var(--muted); margin: 0; }
.card .tag-list { margin-top: auto; padding-top: 10px; }
.card--link:hover { border-color: var(--accent-line); background: var(--surface-hover); }
.card--link a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link a.stretch { color: inherit; text-decoration: none; }
.card .card-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card .card-icon svg { width: 22px; height: 22px; }
.card .card-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.card .more { color: var(--accent); font-size: 0.92rem; font-weight: 500; margin-top: 4px; }

.card--feature { padding: 0; overflow: hidden; }
.card--feature .card-media { background: #f4f2ee; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.card--feature .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card--feature .card-media--contain img { object-fit: contain; padding: 18px; }
.card--feature .card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
@media (max-width: 760px) { .card--split { grid-template-columns: 1fr; } }
.card--wide { grid-column: 1 / -1; }

/* Chatter Radar brand (colors from the project's logo) */
.brand-chatter {
  --accent: #1d8a45;
  --accent-soft: rgba(46, 204, 100, 0.10);
  --accent-line: rgba(46, 204, 100, 0.45);
  border-color: var(--accent-line);
}
.brand-chatter .brand-logo { margin: 4px 0 2px; }
.brand-chatter .brand-logo img { width: min(100%, 300px); height: auto; }
.card--feature .card-media--screenshot {
  display: block; position: relative; aspect-ratio: auto; min-height: 300px;
  background: #f1f3f6; border-right: 1px solid var(--line);
}
.card--feature .card-media--screenshot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left;
}
@media (max-width: 760px) { .card--feature .card-media--screenshot { border-right: 0; border-bottom: 1px solid var(--line); min-height: 260px; } }
.grid--top { align-items: start; }
.card--feature .card-media--fit { aspect-ratio: auto; }
.card--feature .card-media--fit img { height: auto; object-fit: initial; }

.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
  align-self: flex-start;
}
.badge--quiet { background: transparent; color: var(--muted); border-color: var(--line); }

/* ---------- Work list (home) ---------- */

.work-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.work-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.work-item .where { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding-top: 6px; }
.work-item .where strong { display: block; color: var(--text); font-family: var(--font-body); font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.work-item h3 { margin-bottom: 6px; }
.work-item p { color: var(--muted); margin: 0; max-width: 64ch; }
@media (max-width: 720px) { .work-item { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Open to ---------- */

.engage {
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
}
.engage-card { border-top: 3px solid var(--accent); }
.engage-cta {
  margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 24px 28px; border-radius: var(--radius); border: 1px dashed var(--accent-line); background: var(--accent-soft);
}
.engage-cta p { margin: 0; color: var(--text); flex: 1 1 320px; }

/* ---------- Writing list ---------- */

.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: baseline;
  padding: 24px 4px; text-decoration: none; color: inherit;
}
.post-list a:hover h3 { color: var(--accent); }
.post-list h3 { margin: 0; transition: color .15s; }
.post-list p { grid-column: 1 / -1; margin: 0; color: var(--muted); max-width: 70ch; }
.post-list .meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.post-list .featured-label { color: var(--accent); }
@media (max-width: 640px) { .post-list a { grid-template-columns: 1fr; } }

/* ---------- Two column prose (about) ---------- */

.split { display: grid; grid-template-columns: 1fr 340px; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split aside { position: sticky; top: 96px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split aside { position: static; } }

.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }

.photo-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.photo-card img { width: 100%; }
.photo-card figcaption { padding: 12px 16px; color: var(--muted); font-size: 0.88rem; }
.photo-card + .photo-card { margin-top: 20px; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 24px; color: var(--muted); }
.facts li::before { content: "→"; color: var(--accent); position: absolute; left: 0; }

/* ---------- Timeline (experience) ---------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline > li { position: relative; padding: 0 0 44px 40px; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline > li.is-current::before { background: var(--accent); }
.timeline .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); letter-spacing: .04em; }
.timeline h3 { margin: 4px 0 2px; }
.timeline .org { color: var(--accent); font-weight: 500; margin-bottom: 10px; }
.timeline .summary { color: var(--muted); margin-bottom: 10px; }
.timeline ul.points { margin: 0 0 12px; padding-left: 1.1em; }
.timeline ul.points li { margin-bottom: 6px; }
.timeline ul.points li::marker { color: var(--accent); }

.skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-groups .card h3 { font-size: 1.1rem; }
.skill-groups .card--signature { grid-column: 1 / -1; border-color: var(--accent-line); }
@media (max-width: 720px) { .skill-groups { grid-template-columns: 1fr; } }

.ref-list { list-style: none; padding: 0; margin: 0; }
.ref-list li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.ref-list li:first-child { padding-top: 0; }
.ref-list .ref-title { display: block; color: var(--text-strong); font-weight: 500; }
.ref-list .ref-title a { color: inherit; }
.ref-list .ref-title a:hover { color: var(--accent); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; min-width: 0;
}
.contact-link span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.contact-link strong { font-weight: 500; overflow-wrap: anywhere; }
.contact-link:hover { border-color: var(--accent-line); color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--faint); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Article ---------- */

.article-head { padding: clamp(48px, 8vw, 88px) 0 24px; }
.article-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.article-head .standfirst { font-size: 1.2rem; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); margin-top: 18px; }
.back-link { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }

.origin-note {
  margin: 28px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem; color: var(--text);
}
.origin-note a { color: var(--accent); }

.article { padding-bottom: 64px; font-size: 1.08rem; line-height: 1.75; }
.article h2 { font-size: 1.75rem; margin: 2.2em 0 0.6em; }
.article h3 { font-size: 1.3rem; margin: 1.8em 0 0.5em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 0.4em; }
.article li::marker { color: var(--accent); }
.article strong { color: var(--text-strong); }
.article figure { margin: 2em 0; }
.article figure img, .article figure video {
  margin: 0 auto; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line);
}
.article figure.wide { margin-left: calc(-1 * min(120px, 8vw)); margin-right: calc(-1 * min(120px, 8vw)); }
@media (max-width: 900px) { .article figure.wide { margin-left: 0; margin-right: 0; } }
.article figure.small img { max-width: 360px; }
.article figure.no-bg img, .article figure.no-bg video { background: transparent; border: 0; }
.article figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.article .math-block { margin: 1.4em 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.article .katex { font-size: 1.08em; }
.article .katex-display { margin: 0; }

.article code:not(pre code) {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.article pre {
  margin: 1.6em 0; padding: 20px 22px; overflow-x: auto;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.86rem; line-height: 1.6;
}
.article pre code { font-family: var(--font-mono); background: none; padding: 0; }
.code-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); margin: 1.6em 0 -1.2em; text-transform: uppercase; letter-spacing: .06em; }

.callout {
  margin: 1.8em 0; padding: 16px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.98rem;
}
.callout strong { color: var(--text-strong); }

.article-end { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.article-end img { width: 64px; height: 64px; border-radius: 50%; }
.article-end p { margin: 0; color: var(--muted); flex: 1 1 280px; }

/* highlight.js tweaks (atom-one-dark base) */
.hljs { background: transparent !important; }

/* ---------- Single page ---------- */

.wrap--page { max-width: calc(880px + 2 * var(--gutter)); }

.intro { display: flex; align-items: center; gap: clamp(20px, 4vw, 36px); padding: clamp(40px, 7vw, 72px) 0 clamp(32px, 5vw, 48px); }
.intro-photo {
  width: clamp(110px, 18vw, 160px); height: auto; aspect-ratio: 1 / 1; flex: none;
  border-radius: 50%; object-fit: cover; background: #e6e5e3;
  border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0; }
.intro-role { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--accent); margin: 2px 0 12px; }
.intro-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.95rem; }
.intro-links a { color: var(--muted); text-decoration: none; }
.intro-links a:hover { color: var(--accent); }
@media (max-width: 480px) { .intro { flex-direction: column; align-items: flex-start; } }

.block { padding: clamp(36px, 6vw, 56px) 0; border-top: 1px solid var(--line); }
.block > h2 { font-size: 1.6rem; margin-bottom: 28px; }

.block .timeline > li { padding-bottom: 28px; }
.block .timeline h3 { font-size: 1.1rem; margin: 2px 0 4px; }
.block .timeline h3 .org { display: inline; color: var(--muted); font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; margin: 0; }
.block .timeline p { color: var(--muted); margin: 0; font-size: 0.98rem; }

.sub-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-top: 12px; }
@media (max-width: 720px) { .sub-blocks { grid-template-columns: 1fr; } }
.sub-head { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 10px; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.95rem; color: var(--muted); }
.plain-list a { color: var(--text); }
.plain-list a:hover { color: var(--accent); }

.block .post-list a { padding: 18px 4px; }
.block .post-list h3 { font-size: 1.1rem; }

/* ---------- Landing ---------- */

.landing {
  min-height: 100vh; min-height: 100svh;
  max-width: calc(1000px + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center;
}
.landing h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin: 0; }
.landing-role { font-size: 1.4rem; color: var(--muted); margin: 10px 0 18px; }
.landing-line { max-width: 46ch; margin: 0 0 36px; }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.landing-photo {
  width: min(100%, 340px); aspect-ratio: 1 / 1; height: auto; justify-self: center;
  border-radius: 50%; object-fit: cover; border: 6px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(60, 45, 30, 0.35);
}
@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; align-content: center; }
  .landing-photo { width: 200px; justify-self: start; order: -1; }
}

.btn--outline { border: 2px solid var(--accent); color: var(--accent); font-weight: 600; padding: 10px 22px; }
.btn--outline:hover { background: var(--accent); color: var(--on-accent); }
.icon-link { color: #5b6170; display: inline-flex; }
.icon-link:hover { color: var(--accent); }

/* ---------- Project cards (uniform) ---------- */

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 20px; }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.project {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.project--link:hover { border-color: var(--accent-line); }
.project-media { height: 180px; flex: none; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line); background: var(--surface); }
.project-media--logo img { max-width: 62%; max-height: 110px; width: auto; height: auto; }
.project-media--cover { overflow: hidden; }
.project-media--cover img { width: 100%; height: 100%; object-fit: cover; }
.project-media--icon { background: var(--bg-raised); color: var(--accent); }
.project-media--icon svg { width: 56px; height: 56px; }
.project-body { padding: 20px 22px 22px; }
.project-body h3 { font-size: 1.15rem; margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-body h3 a { color: inherit; text-decoration: none; }
.project-body h3 a.stretch::after { content: ""; position: absolute; inset: 0; }
.project-body p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.project-year { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; }
.project .badge { font-size: 0.65rem; }
@media (max-width: 480px) {
  .landing-actions { gap: 14px 16px; }
  .icon-link svg { width: 30px; height: 30px; }
}
