/* ryankuo.net: one stylesheet for every page. */

:root {
	--bg: #e3e3e3;
	--ink: #111111;
	--muted: #555555;
	--faint: #7a7a7a;
	--sans: Karla, 'Helvetica Neue', Arial, sans-serif;
	--mono: 'Space Mono', ui-monospace, Menlo, monospace;
	--ease: cubic-bezier(.22, .8, .24, 1);
}

html { background: var(--bg); }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 1160px; margin: 0 auto; padding: 28px 32px 96px; display: flex; flex-direction: column; gap: 32px; box-sizing: border-box; }

/* Header: name on the left (with a back link on project pages), search and nav on the right. */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px 32px; font-family: var(--mono); font-size: 13px; }
.site-header .left { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.site-header .name { font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.site-header .back { text-decoration: none; }
.site-header .right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 28px; }
.site-search { display: flex; align-items: center; gap: 8px; }
.site-search input { font: inherit; font-size: 12px; width: 200px; max-width: 46vw; padding: 6px 8px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.site-search .count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.site-nav a, .site-nav button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; }
.site-nav [aria-current="page"] { font-weight: 700; }
.filters { display: flex; gap: 4px; }
.filters button { font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Bodies: Markdown text, image groups, videos. */
.body { display: flex; flex-direction: column; gap: 18px; }
.body .text { max-width: 40em; font-size: 16px; line-height: 1.6; }
.body .text p { margin: 0 0 12px; }
.body .text p:last-child { margin-bottom: 0; }
.body figure { margin: 0; }
.body figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.body .images { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 10px; align-items: start; }
.body .images img { display: block; width: 100%; height: auto; }
.body .video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.body .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) {
	.body .images { grid-template-columns: repeat(min(var(--cols, 1), 2), minmax(0, 1fr)); }
}

/* Dots shared by the timeline and project history. */
.dot { box-sizing: border-box; border-radius: 50%; }
.dot-work { width: 9px; height: 9px; background: var(--ink); }
.dot-main { width: 15px; height: 15px; background: var(--ink); }
.dot-wip { width: 13px; height: 13px; background: var(--bg); border: 1.5px dashed #666; }
.dot-show { width: 9px; height: 9px; background: var(--faint); }
.dot-note { width: 9px; height: 9px; background: var(--bg); border: 1.5px solid var(--ink); }
.dot-update { width: 9px; height: 9px; background: var(--bg); border: 1.5px dashed #666; }
.dot-image { width: 10px; height: 10px; border: 1.5px solid var(--ink); background: radial-gradient(circle, var(--ink) 0 1.6px, var(--bg) 2.2px); }
.dot-future { width: 9px; height: 9px; background: var(--bg); border: 1.5px solid var(--faint); }

@media (max-width: 700px) {
	.page { padding: 18px 16px 72px; gap: 24px; }
	.site-header .right, .site-header .bar { align-items: flex-start; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Project pages: each work a box on a line, with its history beside it. */
.project-head h1 { margin: 0; font-size: 56px; line-height: 0.95; letter-spacing: -0.03em; }
.project-meta { margin: 8px 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.project-intro { max-width: 46em; }
.bands { position: relative; display: flex; flex-direction: column; gap: 36px; }
.band { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 48px; align-items: start; scroll-margin-top: 24px; }
.version { border: 1px solid var(--ink); padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; background: var(--bg); }
.version-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; }
.version-head h2 { margin: 0; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.version-head .project-meta { margin: 0; font-size: 12px; }
.details { font-size: 14px; line-height: 1.5; color: #333; }
.details p { margin: 0; }
.part-of { align-self: flex-start; font-family: var(--mono); font-size: 12px; }
.history { position: relative; }
.history h3 { margin: 0 0 14px 108px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.history ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; position: relative; }
.history ol::before { content: ""; position: absolute; left: 91.5px; top: 6px; bottom: 6px; width: 1px; background: var(--ink); }
.history li { display: grid; grid-template-columns: 76px 32px minmax(0, 1fr); align-items: start; }
.history-date { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; line-height: 20px; }
.history .dot { justify-self: center; margin-top: 6px; position: relative; z-index: 1; }
.history a { font-size: 15px; line-height: 20px; text-decoration: none; }
.history a:hover { text-decoration: underline; }

/* Info: about, then the CV by section. */
.info { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.about { flex: 999 1 560px; min-width: 0; max-width: 42em; font-size: 19px; line-height: 1.5; }
.about p { margin: 0 0 16px; }
.contact { flex: 1 1 220px; font-family: var(--mono); font-size: 13px; }
.contact p { margin: 0 0 6px; }
.cv { width: 100%; display: flex; flex-direction: column; gap: 34px; }
.cv h2 { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 400; }
.cv ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cv li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; font-size: 15px; line-height: 1.45; }
.cv .year { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 22px; }
.cv a { text-decoration: none; border-bottom: 1px solid #999; }

@media (max-width: 860px) {
	.band { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
	.project-head h1 { font-size: 40px; }
	.version { padding: 20px 18px 24px; }
}
