/* Markdown Made Simple case study (markup in tools/content/markdown-made-simple.html): the
   Resume page's light bento tiles, broken up by short reading columns. Accent is the app's own. */
.mm {
  --tile: #fff; --ink: #111; --muted: #6b6b6b; --rule: rgba(0,0,0,.08); --accent: #e06c26; --cream: #fdf7f1;
  box-sizing: border-box; width: 100%; max-width: 1200px; margin: 0 auto; padding: 136px 24px 120px;
  color: var(--ink); font-family: Font, sans-serif; font-size: 16px; line-height: 1.5;
}
.mm *, .mm *::before, .mm *::after { box-sizing: inherit; }
.mm :where(h1, h2, h3, p, ul, ol, figure, figcaption) { margin: 0; padding: 0; text-align: left; }
.mm :where(ul, ol) { list-style: none; }
.mm a { color: inherit; text-decoration: none; }

@keyframes mm-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

.mm-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.mm-grid + .mm-grid { margin-top: 12px; }
.mm-tile {
  position: relative; overflow: hidden; padding: 28px; border-radius: 24px; background: var(--tile);
  border: 1px solid var(--rule); box-shadow: 0 1px 2px rgba(0,0,0,.04); animation: mm-in .7s cubic-bezier(.22,1,.36,1) both;
  transition: border-color .25s, box-shadow .25s;
}
.mm-tile:hover { border-color: rgba(0,0,0,.14); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.mm-grid > :nth-child(2) { animation-delay: .05s; } .mm-grid > :nth-child(3) { animation-delay: .1s; }
.mm-grid > :nth-child(4) { animation-delay: .15s; } .mm-grid > :nth-child(5) { animation-delay: .2s; }
.mm-grid > :nth-child(6) { animation-delay: .25s; } .mm-grid > :nth-child(7) { animation-delay: .3s; }

.mm-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Hero */
.mm-hero { grid-column: span 3; display: flex; flex-direction: column; min-height: 420px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(224,108,38,.18), transparent 55%), var(--tile); }
.mm-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(224,108,38,.3); }
.mm-icon svg { width: 44px; fill: #fff; }
.mm-title { margin-top: 28px; font-size: clamp(48px, 7vw, 96px); font-weight: 700; line-height: .92; letter-spacing: -.04em; }
.mm-lede { max-width: 560px; margin-top: 20px; font-size: 20px; line-height: 1.45; color: var(--muted); }
.mm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 32px; }
.mm-chips li { padding: 8px 14px; border-radius: 99px; background: rgba(0,0,0,.04); border: 1px solid var(--rule); font-size: 14px; font-weight: 500; }

/* Role */
.mm-role { display: flex; flex-direction: column; background: var(--accent); border-color: transparent; color: #fff; }
.mm-role .mm-eyebrow { color: rgba(255,255,255,.75); }
.mm-role h2 { margin-top: auto; font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.mm-role p:last-child { margin-top: 12px; color: rgba(255,255,255,.85); }

/* Screenshots */
.mm-shot { grid-column: 1 / -1; padding: 0; background: #fbe3cf; }
.mm-shot img { display: block; width: 100%; height: auto; }
.mm-shot figcaption { padding: 14px 20px; border-top: 1px solid var(--rule); background: var(--tile); font-size: 14px; color: var(--muted); }

/* Stats */
.mm-stat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 180px; }
.mm-big { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.mm-big sup { margin-left: 4px; font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); vertical-align: top; position: relative; top: 10px; }
.mm-stat p:last-child { margin-top: 10px; font-size: 16px; line-height: 1.35; color: var(--muted); }

/* Reading columns between the tiles */
.mm-story { max-width: 720px; padding: 72px 28px 32px; }
.mm-story .mm-eyebrow { margin-bottom: 16px; }
.mm-story p { font-size: 18px; line-height: 1.6; color: #333; }
.mm-story p + p { margin-top: 16px; }
.mm-story .mm-intro { font-size: clamp(24px, 3vw, 32px); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }

/* Principles: each beside a recording of the real app */
.mm-num { font-size: 14px; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.mm-point { display: flex; flex-direction: column; }
.mm-point h3 { margin-top: auto; padding-top: 32px; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.mm-point p:last-child { margin-top: 12px; color: var(--muted); }
.mm-feature .mm-film { grid-column: span 3; }
.mm-feature.is--flip .mm-point { grid-column: 4; grid-row: 1; }
.mm-feature.is--flip .mm-film { grid-column: 1 / 4; grid-row: 1; }
.mm-point.is--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: end; }
.mm-point.is--wide .mm-num { grid-column: 1 / -1; }
.mm-point.is--wide h3 { padding-top: 24px; }
.mm-film { padding: 0; background: #fce6d4; }
.mm-film video { display: block; width: 100%; height: auto; }
.mm-film.is--full { grid-column: 1 / -1; }
.mm-film.is--zoom { background: var(--tile); }
.mm-film figcaption { padding: 14px 20px; border-top: 1px solid var(--rule); background: var(--tile); font-size: 14px; color: var(--muted); }

/* Commit log and self-check */
.mm-log, .mm-check { grid-column: span 2; }
.mm-log { background: var(--cream); }
.mm-log li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.mm-log li:first-child { border-top: 0; padding-top: 0; }
.mm-log li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.mm-log code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.5; }
.mm-check p:last-child { font-size: 18px; line-height: 1.55; color: #333; }

/* Dark + serif pair */
.mm-pair .mm-shot { grid-column: span 2; background: var(--tile); }

/* Next */
.mm-next a { grid-column: span 2; display: flex; flex-direction: column; min-height: 160px; transition: background-color .2s, color .2s, border-color .2s; }
.mm-next span { display: flex; justify-content: space-between; margin-top: auto; font-size: 32px; font-weight: 500; letter-spacing: -.02em; }
.mm-next b { font-weight: 500; transition: transform .25s cubic-bezier(.22,1,.36,1); }
.mm-next a:hover b { transform: translateX(4px); }
.mm-next a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.mm-next a:hover .mm-eyebrow { color: rgba(255,255,255,.7); }
.mm-next a.is--accent { background: var(--accent); border-color: transparent; color: #fff; }
.mm-next a.is--accent .mm-eyebrow { color: rgba(255,255,255,.75); }
.mm-next a.is--accent:hover { background: var(--ink); }

@media (max-width: 991px) {
  .mm-grid { grid-template-columns: 1fr 1fr; }
  .mm-hero { grid-column: 1 / -1; min-height: 0; }
  .mm-role { grid-column: 1 / -1; }
  .mm-role h2 { margin-top: 8px; }
  .mm-feature .mm-point, .mm-feature .mm-film, .mm-feature.is--flip .mm-point, .mm-feature.is--flip .mm-film { grid-column: 1 / -1; grid-row: auto; }
  .mm-point h3 { padding-top: 16px; }
  .mm-point.is--wide { display: flex; }
  .mm-log, .mm-check, .mm-pair .mm-shot { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .mm { padding: 120px 12px 80px; }
  .mm-tile { padding: 22px; border-radius: 20px; }
  .mm-shot, .mm-film { padding: 0; }
  .mm-lede { font-size: 18px; }
  .mm-big { font-size: 48px; }
  .mm-stat { min-height: 150px; }
  .mm-story { padding: 56px 10px 24px; }
  .mm-story p { font-size: 17px; }
  .mm-next a { grid-column: 1 / -1; min-height: 120px; }
  .mm-next span { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .mm * { animation: none !important; } }
