/* Long-read pages (Date Me, Marketing Consulting, Codex Vitae). Same look as manual-of-me.html. */
:root {
  --bg: #fdf6ec; --text: #22201d; --muted: #6f675d; --rule: rgba(34, 32, 29, 0.12); --soft: rgba(34, 32, 29, 0.05);
  --accent: #c2471f; --k1: #2f6f62; --k2: #7a4e8c; --k3: #d9542f; --k4: #e9b23f;
  --serif: Fraunces, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1a18; --text: #efe9df; --muted: #a39b91; --rule: rgba(239, 233, 223, 0.14); --soft: rgba(239, 233, 223, 0.06); --accent: #e0683f; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 Inter, system-ui, sans-serif; }
main { max-width: 680px; margin: 0 auto; padding: 0 20px 96px; }
a { color: var(--accent); text-underline-offset: 3px; }

.strip { display: flex; gap: 8px; justify-content: center; padding: 40px 0 0; }
.strip span { height: 10px; border-radius: 6px; animation: breathe 9s ease-in-out infinite; }
.strip span:nth-child(1) { width: 64px; background: var(--k1); }
.strip span:nth-child(2) { width: 28px; background: var(--k2); animation-delay: -2s; }
.strip span:nth-child(3) { width: 44px; background: var(--k3); animation-delay: -4s; }
.strip span:nth-child(4) { width: 16px; background: var(--k4); animation-delay: -6s; }
@keyframes breathe { 50% { transform: scaleX(1.35); } }
@media (prefers-reduced-motion: reduce) { .strip span { animation: none; } }

header { text-align: center; padding: 28px 0 8px; }
header h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(36px, 7vw, 52px); line-height: 1.05; margin: 0 0 12px; }
header .by { color: var(--muted); font-size: 15px; margin: 0; }
header .by a { color: inherit; }
.intro { margin-top: 40px; }

nav.toc { margin: 40px 0 8px; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
nav.toc h2 { font: 600 12px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
nav.toc ol { list-style: none; margin: 0; padding: 0; }
nav.toc li { margin: 0 0 10px; line-height: 1.5; }
nav.toc li.l3 { padding-left: 20px; font-size: 15px; }
nav.toc li.l3 a { font-weight: 500; }
nav.toc a { font-weight: 700; text-decoration: none; color: var(--text); }
nav.toc a:hover { color: var(--accent); }

article h2, article h3, article h4 { font-family: var(--serif); line-height: 1.2; scroll-margin-top: 24px; }
article h2 { font-size: 30px; margin: 64px 0 8px; }
article h3 { font-size: 22px; margin: 40px 0 6px; }
article h4 { font-size: 18px; margin: 28px 0 4px; }
article h2 a, article h3 a { color: inherit; text-decoration: none; }
article h2 a:hover::after, article h3 a:hover::after { content: " #"; color: var(--accent); }
article ul, article ol { padding-left: 22px; }
article li { margin: 6px 0; }
article li::marker { color: var(--accent); }
article li.toggle { list-style: none; margin-left: -22px; }
summary { cursor: pointer; list-style: none; padding-left: 22px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; position: absolute; left: 4px; top: .62em; border: 5px solid transparent; border-left: 7px solid var(--accent); transition: transform .15s; transform-origin: 3px 50%; }
details[open] > summary::before { transform: rotate(90deg); }
summary:hover { color: var(--accent); }
details > .more { margin: 4px 0 14px 22px; }
details > .more > :first-child { margin-top: 0; }
article hr { border: 0; height: 1px; background: var(--rule); margin: 56px 0; }
article code { font-size: .9em; }
article blockquote, .callout { margin: 24px 0; padding: 16px 20px; background: var(--soft); border-left: 3px solid var(--k4); border-radius: 0 12px 12px 0; }
.callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; }
figure { margin: 28px 0; text-align: center; }
figure img, figure video { max-width: 100%; max-height: 520px; height: auto; border-radius: 14px; }
figcaption { color: var(--muted); font-size: 14px; font-style: italic; margin-top: 8px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-weight: 600; }
.top { display: block; text-align: center; margin-top: 48px; font-size: 14px; color: var(--muted); }

/* Codex index */
.years { list-style: none; padding: 0; margin: 40px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.years a { display: block; padding: 22px 18px; border-radius: 16px; text-decoration: none; color: #fdf6ec; font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1; }
.years a small { display: block; font: 500 13px/1.4 Inter, sans-serif; margin-top: 10px; opacity: .85; }
.years li:nth-child(4n+1) a { background: var(--k1); } .years li:nth-child(4n+2) a { background: var(--k2); }
.years li:nth-child(4n+3) a { background: var(--k3); } .years li:nth-child(4n+4) a { background: #b98a1e; }
.years a:hover { transform: translateY(-2px); }

/* Marketing competencies */
.sorter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 32px 0 8px; font-size: 14px; color: var(--muted); }
.sorter button { font: 500 14px Inter, sans-serif; color: var(--text); background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.sorter button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.comps { list-style: none; padding: 0; margin: 0; }
.comp { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.comp .row { display: grid; grid-template-columns: 1fr 190px; gap: 6px 20px; align-items: center; }
.comp b { font-family: var(--serif); font-size: 19px; }
.comp .desc { color: var(--muted); grid-column: 1; margin: 0; font-size: 15px; }
.bar { grid-column: 2; grid-row: 1 / span 2; }
.bar .track { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar .fill { height: 100%; background: var(--k1); border-radius: 4px; }
.bar small { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.joy-High { color: var(--k3); font-weight: 600; }
.comp details { margin-top: 8px; font-size: 15px; }
.comp summary { color: var(--muted); }
.comp ol { margin: 6px 0 0 22px; padding-left: 18px; }
@media (max-width: 560px) { .comp .row { grid-template-columns: 1fr; } .bar { grid-column: 1; grid-row: auto; } }

/* Image mosaic (runs of images, Notion-style columns); a bit wider than the text column */
.mosaic { columns: 3 190px; column-gap: 18px; margin: 32px 0; width: min(960px, calc(100vw - 40px)); position: relative; left: 50%; transform: translateX(-50%); }
.mosaic figure { break-inside: avoid; margin: 0 0 22px; text-align: left; }
.mosaic figure img, .mosaic figure video { width: 100%; max-height: none; border-radius: 10px; display: block; }
.mosaic figcaption { font-style: normal; font-size: 15px; margin-top: 8px; }
li .mosaic { width: auto; left: 0; transform: none; columns: 2 160px; }

/* List + single image side by side (Date Me basics) */
.side { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
.side figure { margin: 6px 0 0; text-align: left; }
.side figure img { max-height: none; width: 100%; border-radius: 10px; }
.side figcaption { font-style: normal; font-size: 15px; }
@media (max-width: 600px) { .side { grid-template-columns: 1fr; } .side figure { max-width: 300px; } }

/* Page cover (Date Me's xkcd banner), wider than the text column like Notion */
.cover { width: min(960px, calc(100vw - 40px)); position: relative; left: 50%; transform: translateX(-50%); margin: 28px 0 0; }
.cover img { width: 100%; height: auto; max-height: none; border-radius: 12px; display: block; }
.cover figcaption { text-align: right; font-size: 12px; font-style: normal; }
.cover figcaption a { color: inherit; }

/* Worldview: each book with its cover beside the heading */
.book { position: relative; padding-left: 138px; margin: 48px 0; min-height: 170px; }
.book .bookcover { position: absolute; left: 0; top: 6px; width: 110px; border-radius: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.book h2 { margin-top: 0; font-size: 24px; }
.book h2 a { color: inherit; }
@media (max-width: 560px) { .book { padding-left: 88px; min-height: 110px; } .book .bookcover { width: 72px; } }

/* Marketing Consulting hero: heading + pitch + icons, photo links to LinkedIn */
.mk-hero { display: grid; grid-template-columns: 1fr 230px; gap: 36px; align-items: center; }
.mk-hero ul { padding-left: 20px; margin: 12px 0 20px; }
.mk-hero li { margin: 4px 0; }
.mk-icons { display: flex; gap: 14px; margin: 0; }
.mk-icons a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--soft); color: var(--accent); transition: background .2s, color .2s; }
.mk-icons a:hover { background: var(--accent); color: var(--bg); }
.mk-icons svg { width: 20px; height: 20px; }
.mk-photo { position: relative; display: block; transform: rotate(1.5deg); transition: transform .3s; }
.mk-photo img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,0.18); }
.mk-photo:hover { transform: rotate(0deg) scale(1.02); }
.mk-badge { position: absolute; right: -10px; bottom: -10px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--accent); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.7); transition: opacity .25s, transform .25s; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.mk-badge svg { width: 20px; height: 20px; }
.mk-photo:hover .mk-badge, .mk-photo:focus-visible .mk-badge { opacity: 1; transform: scale(1); }
@media (hover: none) { .mk-badge { opacity: 1; transform: scale(1); } }
.mk-notes { margin-top: 40px; color: var(--muted); font-size: 15px; }
header .by:empty { display: none; }
@media (max-width: 600px) { .mk-hero { grid-template-columns: 1fr; } .mk-photo { max-width: 260px; } }
.mk-hero { margin-bottom: 48px; }
.mk-h1 { display: block; white-space: nowrap; font-size: 42px; }
@media (max-width: 700px) { .mk-h1 { white-space: normal; font-size: clamp(32px, 9vw, 42px); } }
.mk-h1 em { color: var(--k1); font-style: normal; }
.mk-hero { margin-top: 8px; }
.mk-cta { font-weight: 600; font-size: 19px; margin: 0; }
.mk-cta a { text-decoration: none; }
@media (prefers-color-scheme: dark) { .mk-h1 em { color: #6fbfac; } }
.mk-above { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--rule); }
.mk-above h2 { font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1.15; margin: 0 0 8px; }
.mk-above p { color: var(--muted); margin: 0 0 20px; }

/* Other pages index */
.others { list-style: none; padding: 0; margin: 32px 0 0; }
.others li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.others li > a { font-family: var(--serif); font-weight: 800; font-size: 24px; text-decoration: none; }
.others li p { grid-column: 1; margin: 0; color: var(--muted); font-size: 15px; }
.others .copy { grid-column: 2; grid-row: 1 / span 2; font: 500 14px Inter, system-ui, sans-serif; color: var(--text); background: var(--soft); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.others .copy:hover { border-color: var(--accent); color: var(--accent); }
