/* michaelvitale.me: one stylesheet. Colours and sizes are set once here. */
:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --ink: #14202e;
  --muted: #56616f;
  --line: #dde3ea;
  --accent: #1c3d63;
  --accent-soft: #e8eef6;
  --highlight: #9b7a3c;
  --warn: #9a6a14;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1120px;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin: 0.3em 0; }
code { font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
.draft-banner { background: #fff4d6; color: #5c4508; border-bottom: 1px solid #ecd49a; padding: 8px 24px; font-size: 14px; text-align: center; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { font: 600 18px var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-header nav a:hover, .site-header nav a[aria-current='page'] { color: var(--ink); }
.site-header nav a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* shared blocks */
.kicker { display: block; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.lede { font-size: 19px; line-height: 1.55; color: #343b42; max-width: 720px; }
.block { padding-top: 56px; }
.block-title, .two-col > h2 { font-size: 26px; }
.block-title { margin-bottom: 8px; }
.block-intro { color: var(--muted); max-width: 720px; margin-bottom: 20px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.block-head a { font-weight: 500; }
.two-col { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.two-col > h2 { padding-top: 2px; }
.prose { max-width: 720px; }
.prose h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 22px 0 8px; }
.prose h3:first-child { margin-top: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-block; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #142d4a; }
.fill-in { border: 2px dashed #d3a93c; background: #fffaf0; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 1em; color: #5c4508; font-size: 15px; }
.fill-in strong { display: block; margin-bottom: 4px; }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: center; padding-top: 56px; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 16px; }
.headshot { width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius); }
.timeline article { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline article:first-child { border-top: 0; padding-top: 0; }
.timeline .date { color: var(--muted); font-size: 14px; padding-top: 2px; }
.timeline h3 { font-size: 17px; }
.timeline .org { color: var(--muted); margin-bottom: 6px; }
.timeline ul { margin: 6px 0 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.feature-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-img { aspect-ratio: 16 / 9; background: #ffffff; border-bottom: 1px solid var(--line); overflow: hidden; }
.feature-img { background: #fff; }
.feature-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.feature-num { display: flex; flex-direction: column; justify-content: center; padding: 24px; background: var(--accent-soft); }
.feature-num strong { font: 600 44px var(--serif); color: var(--accent); }
.feature-num span { color: var(--muted); }
.feature-body { padding: 18px 20px 22px; }
.feature-body .kicker { font-size: 12px; margin-bottom: 6px; }
.feature-body h3 { font-size: 19px; margin-bottom: 8px; }
.feature-body p { color: var(--muted); font-size: 15px; margin: 0; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 16px; }
.area h3 { font-size: 16px; margin-bottom: 8px; }
.area h3 a { color: var(--ink); text-decoration: none; }
.area ul { list-style: none; padding: 0; font-size: 15px; }
.contact-list { margin: 0; display: grid; gap: 0; max-width: 620px; }
.contact-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }

/* work index */
.page-head { padding-top: 56px; }
.page-head h1 { font-size: clamp(36px, 5vw, 48px); margin-bottom: 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.jump a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.jump a:hover { border-color: var(--accent); }
.jump small { color: var(--muted); margin-left: 4px; }
.work-list { border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.work-row:hover h3 { color: var(--accent); }
.work-row h3 { font-size: 19px; margin-bottom: 6px; }
.work-row p { color: #3d454d; margin-bottom: 6px; }
.work-row em { color: var(--muted); font-style: normal; font-size: 14px; }
.work-meta { text-align: right; }
.work-meta strong { display: block; font: 600 24px var(--serif); color: var(--accent); }
.work-meta span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* project page */
.crumbs { padding-top: 32px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.project-head h1 { font-size: clamp(34px, 5vw, 50px); margin: 10px 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 24px; margin: 28px 0 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.facts dd { margin: 4px 0 0; font-size: 15px; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 28px; }
.numbers div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.numbers strong { display: block; font: 600 30px var(--serif); color: var(--accent); line-height: 1.1; }
.numbers span { color: var(--muted); font-size: 14px; }
.excerpt { margin: 0 0 20px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font: 18px/1.6 var(--serif); max-width: 760px; }
.excerpt p:last-of-type { margin-bottom: 8px; }
.excerpt cite { display: block; font: 13px var(--sans); color: var(--muted); font-style: normal; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.figures.one { grid-template-columns: minmax(0, 860px); }
.figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.figure.wide { grid-column: 1 / -1; }
.figures:not(.one) .figure:last-child:nth-child(odd):not(.wide) { grid-column: 1 / -1; max-width: calc(50% - 10px); }
.figure img { border-radius: 4px; width: 100%; }
.figure figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; padding: 14px 16px 6px; font-weight: 600; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.table-note { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.file-list strong { display: block; }
.file-list span { color: var(--muted); font-size: 14px; }
.file-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; font-weight: 500; white-space: nowrap; }
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.viewer iframe { width: 100%; height: min(78vh, 860px); border: 0; border-radius: 4px; background: #eef1f5; }
.viewer-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.viewer-tabs button { font: 500 14px var(--sans); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.viewer-tabs button[aria-selected='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.viewer-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.resume-viewer iframe { height: min(90vh, 1100px); }
.disclosure { margin-top: 32px; color: var(--muted); font-size: 14px; max-width: 760px; }
.project-next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 500; }

/* contact page */
.contact-page { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.contact-page .lede { margin-bottom: 24px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .headshot { max-width: 240px; }
  .two-col { grid-template-columns: 1fr; gap: 14px; }
  .figures { grid-template-columns: 1fr; }
  .contact-page { grid-template-columns: 1fr; }
  .contact-page .headshot { max-width: 200px; order: -1; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; }
  .site-header nav { gap: 16px; }
  .lede { font-size: 17px; }
  .timeline article { grid-template-columns: 1fr; gap: 4px; }
  .work-row { grid-template-columns: 1fr; gap: 8px; }
  .work-meta { text-align: left; }
  .file-list li { flex-direction: column; align-items: flex-start; }
  .file-actions { justify-content: flex-start; white-space: normal; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
  .viewer { display: none; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers strong { font-size: 24px; }
}

/* surfaces on the white page */
.feature-card, .numbers div, .figure, .table-wrap, .viewer, .excerpt { background: var(--surface); }
.feature-img, .figure img { background: #fff; }
.site-footer { background: var(--surface); }
.kicker { color: var(--highlight); }
.hero .kicker { color: var(--accent); }

/* folders (drop-downs) */
.folders { display: grid; gap: 12px; }
.folder { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.folder > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 4px 16px; align-items: baseline; padding: 18px 20px; }
.folder > summary::-webkit-details-marker { display: none; }
.folder > summary::after { content: '+'; grid-column: 3; grid-row: 1; font-size: 22px; line-height: 1; color: var(--accent); justify-self: end; }
.folder[open] > summary::after { content: '−'; }
.folder[open] > summary { border-bottom: 1px solid var(--line); }
.folder-name { font: 600 21px/1.25 var(--serif); color: var(--ink); }
.folder-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.folder-bio { grid-column: 1 / -1; color: var(--muted); font-size: 15px; max-width: 760px; }
.folder > summary:hover .folder-name { color: var(--accent); }
.folder .work-list { border-top: 0; padding: 0 20px; }
.folder .work-row:last-child { border-bottom: 0; }
.folder-links { list-style: none; margin: 0; padding: 8px 20px 14px; display: grid; gap: 0; }
.folder-links li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.folder-links li:last-child { border-bottom: 0; }
.folder-links a { font-weight: 500; text-decoration: none; }
.folder-links a:hover { text-decoration: underline; }
.folder-links span { color: var(--muted); font-size: 14px; text-align: right; }

/* résumé on the home page */
.home-resume iframe { height: min(85vh, 1000px); }
.resume-mobile { display: none; margin-top: 8px; }
@media (max-width: 600px) {
  .resume-mobile { display: block; }
  .folder-links li { flex-direction: column; gap: 2px; }
  .folder-links span { text-align: left; }
  .folder > summary { padding: 16px; }
}

/* next-page ribbon */
.ribbon { display: block; margin-top: 64px; background: var(--accent); color: #fff; text-decoration: none; }
.ribbon + .site-footer { margin-top: 0; }
.ribbon-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px; }
.ribbon-kicker { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
.ribbon strong { display: block; font: 600 clamp(22px, 3vw, 28px)/1.2 var(--serif); }
.ribbon-note { display: block; margin-top: 4px; opacity: .8; font-size: 15px; }
.ribbon-arrow { font-size: 32px; line-height: 1; transition: transform .2s; }
.ribbon:hover { background: #142d4a; }
.ribbon:hover .ribbon-arrow { transform: translateX(6px); }
.ribbon:focus-visible { outline-offset: -4px; outline-color: #fff; }
.project-next { border-top: 0; padding-top: 0; }
@media (prefers-reduced-motion: reduce) { .ribbon-arrow { transition: none; } }
@media (min-width: 1000px) { .page-home .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .page-home .feature-body h3 { font-size: 17px; } }
