/* Shared site shell and homepage proposal. Collection adapters live in collections.css. */
:root { color-scheme: dark; background: #000; scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 1168px; padding: 0 48px; font-size: 15px; line-height: 1.75; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--mcc-accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--mcc-accent); outline-offset: 5px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, p, figure, dl, dd { margin: 0; }
strong, b { font-weight: 600; }
.muted { color: var(--mcc-muted); }
.site-header { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 64px; font-size: 12px; }
.site-header a { text-decoration: none; }
.site-header nav { display: flex; gap: 28px; }
.wordmark { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-mark { display: block; width: 24px; height: 24px; flex: 0 0 24px; }
.intro-hero { display: grid; grid-template-columns: 1fr 240px; gap: 48px; align-items: end; padding: 20px 0 28px; }
h1 { font-size: clamp(28px, 3.3vw, 36px); }
.title-period { color: var(--mcc-accent); }
.hero-aside { padding-bottom: 4px; font-size: 12px; }
.hero-role { line-height: 1.6; font-weight: 600; margin-bottom: 12px; }
.location { font-size: 11px; }
.location div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; }
.location dt { color: var(--mcc-muted); }
.hero-image img { display: block; width: 100%; height: auto; }
.homepage-collections { margin: 28px 0 36px; }
.homepage-collections-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 16px; }
.homepage-collections-heading h2 { font-weight: 600; font-size: 13px; }
.homepage-collection-links { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--mcc-ink); }
.homepage-collection-link { display: grid; grid-template-columns: 24px 1fr 16px; align-items: baseline; gap: 12px; padding: 24px 20px; text-decoration: none; }
.homepage-collection-link:first-child { padding-left: 0; }
.homepage-collection-link:last-child { padding-right: 0; }
.homepage-collection-link + .homepage-collection-link { border-left: 1px solid var(--mcc-rule); }
.homepage-collection-index { color: var(--mcc-muted); font-size: 10px; }
.homepage-collection-copy strong { display: block; font-size: 18px; letter-spacing: -.035em; }
.homepage-collection-copy > span { display: block; color: var(--mcc-muted); font-size: 11px; line-height: 1.7; margin-top: 6px; }
.homepage-collection-arrow { transition: transform 150ms var(--mcc-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .homepage-collection-link:hover .homepage-collection-arrow { transform: translate(2px, -2px); color: var(--mcc-accent); }
}
.homepage-collection-link:hover .homepage-collection-copy strong { text-decoration: underline; text-decoration-color: var(--mcc-accent); text-underline-offset: 5px; }
.profile-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 64px; }
#TOC { position: sticky; top: 32px; align-self: start; font-size: 11px; }
#TOC ul { list-style: none; padding: 0; margin: 0; counter-reset: contents; }
#TOC li { margin: 0 0 8px; }
#TOC a { display: flex; gap: 16px; text-decoration: none; padding: 3px 0; }
#TOC a::before { counter-increment: contents; content: counter(contents, decimal-leading-zero); color: var(--mcc-muted); font-size: 10px; }
#TOC a.active { font-weight: 800; }
#TOC a.active::before { color: var(--mcc-accent); }
#TOC a:hover { text-decoration: underline; }
main { min-width: 0; padding-bottom: 40px; }
main > h2 { font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -.035em; margin: 0 0 20px; scroll-margin-top: 32px; }
main > p { margin: 0 0 24px; }
main > h2:not(:first-child) { margin-top: 44px; }
details { border-bottom: 1px solid var(--mcc-rule); }
summary { display: flex; align-items: baseline; gap: 14px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 18px 0; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+'; flex: 0 0 12px; font-size: 16px; line-height: 1; color: var(--mcc-muted); }
details[open] > summary::before { content: '−'; color: var(--mcc-accent); }
summary:hover { color: var(--mcc-muted); }
summary .title-container { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 16px; }
.date { flex: 0 0 auto; color: var(--mcc-muted); font-size: 10px; margin: 0 !important; }
details > p, details > ul, .mcc-disclosure-content > p, .mcc-disclosure-content > ul { margin: 0 0 20px 26px; font-size: 13px; }
.mcc-disclosure-content > :last-child { margin-bottom: 20px; }
details p.list-header { font-weight: 600; margin-bottom: 8px; }
main ul { list-style: square; padding-left: 18px; }
main li { margin-bottom: 6px; }
main li::marker { color: var(--mcc-muted); }
main nav { display: flex; flex-wrap: wrap; gap: 10px; }
.action-link, #copy-markdown-button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--mcc-ink); background: var(--mcc-paper); font-size: 11px; text-decoration: none; }
.action-link:hover, #copy-markdown-button:hover { background: var(--mcc-ink); color: var(--mcc-paper); }
#copy-markdown-button:disabled { cursor: wait; color: var(--mcc-muted); }
.copy-status { font-size: 11px; color: var(--mcc-muted); min-height: 20px; margin-top: 10px; }
.copy-status:empty { min-height: 0; margin: 0; }
.footer-info { margin-top: 32px; font-size: 10px; color: var(--mcc-muted); }
.reading-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--mcc-accent); z-index: 10; }
.back-to-top { display: none; position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border: 1px solid var(--mcc-ink); background: var(--mcc-paper); }
.back-to-top.visible { display: block; }
.back-to-top:focus-visible { color: var(--mcc-accent); border-color: var(--mcc-accent); }
@media (hover: hover) and (pointer: fine) {
  .back-to-top:hover { color: var(--mcc-accent); border-color: var(--mcc-accent); }
}
.skip-link { position: fixed; top: -100px; left: 24px; z-index: 20; padding: 10px 16px; background: var(--mcc-paper); border: 1px solid var(--mcc-ink); }
.skip-link:focus { top: 12px; }
@media (max-width: 900px) {
  body { padding-inline: 32px; }
  .intro-hero { grid-template-columns: 1fr 200px; gap: 24px; }
  .profile-layout { grid-template-columns: 156px minmax(0, 1fr); gap: 32px; }
  summary .title-container { flex-direction: column; gap: 2px; }
}
@media (max-width: 640px) {
  body { padding-inline: 20px; font-size: 14px; }
  .site-header { min-height: 56px; font-size: 10px; gap: 12px; flex-wrap: wrap; padding-block: 12px; }
  .site-header nav { margin-left: auto; }
  .site-header nav { gap: 14px; }
  .wordmark { gap: 10px; }
  .intro-hero { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  h1 { font-size: clamp(26px, 6.5vw, 30px); }
  .hero-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-role, .location { margin: 0; }
  .location div { grid-template-columns: 62px 1fr; gap: 4px; font-size: 10px; }
  .homepage-collections { margin: 32px 0 40px; }
  .homepage-collections-heading { display: block; }
  .homepage-collection-links { grid-template-columns: 1fr; }
  .homepage-collection-link, .homepage-collection-link:first-child, .homepage-collection-link:last-child { padding: 18px 0; }
  .homepage-collection-link + .homepage-collection-link { border-left: 0; border-top: 1px solid var(--mcc-rule); }
  .homepage-collection-copy strong { font-size: 16px; }
  .profile-layout { display: block; }
  #TOC { position: static; margin-bottom: 36px; }
  #TOC ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  #TOC li { margin-bottom: 2px; }
  main > h2 { font-size: 22px; }
  main > h2:not(:first-child) { margin-top: 36px; }
  .footer-info { display: block; }
}
@media (max-width: 380px) {
  .site-header { flex-direction: column; align-items: flex-start; padding-block: 18px; gap: 14px; }
  .site-header nav { width: 100%; justify-content: space-between; }
  .hero-aside { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { max-width: none; padding: 0; }
  #TOC, .back-to-top, .reading-progress, .site-header nav { display: none; }
  .profile-layout { display: block; }
}
