/* jrtaylor.com
   The idea is a round brilliant seen from above: one stone, many facets,
   each facet a kind of work. Jeweler's velvet for the dark ground; the
   stone's fire (amber, rose, violet, cyan) only where light hits it.
   Type is Geologica, whose sharpness axis cuts its corners like facets:
   sharp for headings, soft for reading. */

:root {
	--velvet: #121a33;
	--velvet-line: rgba(233, 237, 245, 0.14);
	--platinum: #e9edf5;
	--mist: #a9b3ca;          /* secondary text on velvet (7.6:1) */
	--paper: #f4f5f9;
	--ink: #161f3b;
	--slate: #525d7a;         /* secondary text on paper (6:1) */
	--rule: #d8dce7;
	--link: #4b33c4;
	--link-on-dark: #7fd8ec;

	--amber: #f5b544;
	--rose: #ee5d86;
	--violet: #9b7bff;
	--cyan: #3cc4e0;

	--sans: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;

	--gutter: 1rem;
	--page: 74rem;
	--header-h: 4rem;         /* updated from JS to the header's real height */
}

@media (min-width: 48rem) {
	:root { --gutter: 2rem; }
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-variation-settings: "SHRP" 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4,
.site-name,
.tabs a,
.year-nav,
.button,
.motto blockquote {
	font-variation-settings: "SHRP" 100;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

::selection {
	background: var(--violet);
	color: #fff;
}

:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible,
.koi :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--amber);
}

[hidden] {
	display: none !important;
}

.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* ---------- Header and tabs ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--velvet);
	color: var(--platinum);
	border-bottom: 1px solid var(--velvet-line);
}

.site-header-inner {
	max-width: var(--page);
	margin: 0 auto;
	padding: 0.85rem var(--gutter) 0;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	column-gap: 2rem;
}

.site-name {
	padding-bottom: 0.95rem;
	color: #fff;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.tabs {
	position: relative;
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tabs a {
	display: block;
	padding: 0.5rem 0.8rem 0.95rem;
	color: var(--mist);
	font-size: 0.96875rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
}

.tabs a:hover,
.tabs a[aria-selected="true"] {
	color: #fff;
}

.tab-indicator {
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 0;
	height: 2px;
	background: var(--amber);
}

/* Placed instantly on load; slides only when the reader changes tabs. */
.tab-indicator.is-ready {
	transition: transform 0.25s ease, width 0.25s ease;
}

@media (max-width: 30rem) {
	.site-name { padding-bottom: 0.35rem; }
	.site-header nav { width: 100%; }
	.tabs { justify-content: space-between; width: calc(100% + 1.6rem); margin: 0 -0.8rem; }
}

/* ---------- Panels and shared page parts ---------- */

/* Panels take focus on a tab change so screen readers land in them; an
   outline round the whole page would only get in the way. */
.panel:focus {
	outline: none;
}

html:not(.js) .panel + .panel {
	border-top: 1px solid var(--rule);
}

.page {
	max-width: var(--page);
	margin: 0 auto;
	padding: 3.5rem var(--gutter) 6rem;
}

.page-title {
	margin: 0 0 0.75rem;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 750;
	line-height: 1.05;
	letter-spacing: -0.015em;
}

.page-lead {
	margin: 0 0 2.25rem;
	max-width: 34em;
	color: var(--slate);
	font-size: 1.125rem;
}

.section-title {
	margin: 0 0 1.5rem;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 740;
	line-height: 1.1;
	letter-spacing: -0.015em;
}

.reading {
	max-width: 36em;
}

.reading p {
	margin: 0 0 1.2em;
}

.reading h3 {
	margin: 2.75rem 0 0.75rem;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Corners cut like a stone. */
.button {
	--cut: 0.6rem;
	display: inline-block;
	padding: 0.85rem 1.35rem 0.8rem;
	background: var(--ink);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.button:hover {
	background: var(--link);
}

/* An outline would be clipped by the cut corners, so draw it inside. */
.button:focus-visible {
	outline: none;
	background: var(--link);
	box-shadow: inset 0 0 0 3px var(--amber);
}

/* ---------- Home: hero, the stone and the hats ---------- */

.hero {
	padding: 3.5rem 0 5rem;
	background: var(--velvet);
	color: var(--platinum);
}

.hero-inner {
	display: grid;
	grid-template-areas: "intro" "gem" "hats";
	row-gap: 2.5rem;
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

@media (min-width: 60rem) {
	.hero {
		padding: 5rem 0 7rem;
	}

	.hero-inner {
		grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
		grid-template-areas: "intro gem" "hats gem";
		column-gap: clamp(3rem, 6vw, 6rem);
		row-gap: 4.5rem;
	}
}

.hero-intro { grid-area: intro; }
.hero-gem { grid-area: gem; }
.hats-block { grid-area: hats; }

.hero h1 {
	margin: 0;
}

.hero-name {
	display: block;
	color: #fff;
	font-size: clamp(2.5rem, 5.2vw, 3.75rem);
	font-weight: 760;
	line-height: 1.02;
	letter-spacing: -0.025em;
}

.hero-role {
	display: block;
	margin-top: 0.7rem;
	color: var(--mist);
	font-size: clamp(1.25rem, 2.2vw, 1.5rem);
	font-weight: 400;
	line-height: 1.25;
}

.hero-lead {
	margin: 1.75rem 0 0;
	max-width: 33em;
	font-size: 1.1875rem;
	line-height: 1.6;
}

/* The stone stays in view while the hats scroll past it. */
.gem-stage {
	width: min(100%, 22rem);
	margin: 0 auto;
}

@media (min-width: 60rem) {
	.gem-stage {
		position: sticky;
		top: calc(var(--header-h) + 4rem);
		width: min(100%, 31rem);
		margin-right: 0;
	}
}

.gem {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.gem-base { fill: #182142; }

.facet {
	stroke: rgba(233, 237, 245, 0.3);
	stroke-width: 1;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

/* Plain cut for when the script isn't running; site.js lights the stone. */
.facet--table { fill: #3a4878; }
.facet--star { fill: #2b3864; }
.facet--kite { fill: #243059; }
.facet--girdle { fill: #1e284f; }

.gem-girdle {
	fill: none;
	stroke: rgba(233, 237, 245, 0.6);
	stroke-width: 1.5;
	vector-effect: non-scaling-stroke;
}

.hats-block h2 {
	margin: 0;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.hats-lead {
	margin: 0.4rem 0 0;
	color: var(--mist);
}

.hats {
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--velvet-line);
}

.hat {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	column-gap: 1.1rem;
	padding: 1.35rem 0;
	border-top: 1px solid var(--velvet-line);
}

.hat h3 {
	margin: 0 0 0.3rem;
	color: #fff;
	font-size: 1.1875rem;
	font-weight: 650;
	line-height: 1.25;
	transition: color 0.2s ease;
}

.hat p {
	margin: 0;
	color: #c5cce0;
	font-size: 1rem;
	line-height: 1.55;
}

.hat .hat-tools {
	margin-top: 0.5rem;
	color: var(--mist);
	font-size: 0.875rem;
}

.hat.is-lit h3 {
	color: var(--fire);
}

/* Small stone with one kite lit: which hat a thing belongs to. */
.mark {
	display: block;
	width: 2.75rem;
	height: 2.75rem;
	overflow: visible;
	color: rgba(233, 237, 245, 0.4);
}

.mark-outline {
	fill: none;
	stroke: currentColor;
	stroke-width: 1;
}

.mark-on {
	fill: var(--fire);
	opacity: 0.75;
	transition: opacity 0.2s ease;
}

.hat .mark {
	margin-top: 0.1rem;
}

.hat.is-lit .mark-on {
	opacity: 1;
}

/* ---------- Home: now ---------- */

.now {
	padding: 5rem 0;
}

.now-inner {
	display: grid;
	gap: 2.5rem;
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

@media (min-width: 56rem) {
	.now {
		padding: 7rem 0;
	}

	.now-inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(3rem, 7vw, 7rem);
		align-items: start;
	}
}

.now h2 {
	margin: 0 0 1.1rem;
	max-width: 13em;
	font-size: clamp(1.875rem, 3.4vw, 2.5rem);
	font-weight: 740;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.now-intro p {
	margin: 0 0 1.1rem;
	max-width: 30em;
}

.now-intro .now-role {
	color: var(--slate);
}

.now-intro .button {
	margin-top: 0.75rem;
}

.now-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--rule);
}

.now-list li {
	padding: 1.25rem 0;
	border-top: 1px solid var(--rule);
}

.now-list h3 {
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
	font-weight: 650;
	line-height: 1.3;
}

.now-list p {
	margin: 0;
	color: var(--slate);
}

/* ---------- Photo windows (parallax) ---------- */

/* A window onto a photo that scrolls a little slower than the page. The
   photo is 20% taller than the window so it has room to drift. */
.window {
	position: relative;
	overflow: hidden;
	aspect-ratio: 2 / 1;
	background: var(--rule);
}

.window--wide {
	aspect-ratio: 16 / 10;
}

@media (min-width: 48rem) {
	.window { aspect-ratio: 3 / 1; }
	.window--wide { aspect-ratio: 21 / 9; }
}

.window > img {
	position: absolute;
	top: -10%;
	left: 0;
	width: 100%;
	height: 120%;
	max-width: none;
	object-fit: cover;
	will-change: transform;
}

/* ---------- Home: life teaser ---------- */

.teaser {
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--gutter) 6rem;
}

.teaser-text {
	display: grid;
	gap: 0.75rem 3rem;
	margin-top: 1.75rem;
}

@media (min-width: 48rem) {
	.teaser-text {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	}
}

.teaser h2 {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 720;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.teaser p {
	margin: 0 0 0.6rem;
	max-width: 32em;
}

/* ---------- Work ---------- */

.year-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.1rem;
	margin: 0 0 2.5rem;
	padding: 0;
	list-style: none;
	font-size: 1rem;
	font-weight: 600;
}

.year-group {
	display: grid;
	gap: 0.75rem 2rem;
	margin-top: 2.25rem;
	padding-top: 2.25rem;
	border-top: 1px solid var(--rule);
}

.year-group:first-child {
	margin-top: 0;
}

@media (min-width: 56rem) {
	.year-group {
		grid-template-columns: 7rem minmax(0, 1fr);
	}
}

.year-label {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 740;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

@media (min-width: 56rem) {
	.year-label {
		position: sticky;
		top: calc(var(--header-h) + 1.5rem);
		align-self: start;
	}
}

.projects {
	display: grid;
	gap: 2.25rem;
}

.project {
	display: grid;
	gap: 0.75rem 1.75rem;
	align-items: start;
}

@media (min-width: 40rem) {
	.project {
		grid-template-columns: 12.5rem minmax(0, 36em);
	}
}

/* Shown at their real size: these are 200px screenshots from the 2000s. */
.project-shot {
	width: auto;
	max-width: 12.5rem;
	background: #fff;
	box-shadow: 0 0 0 1px var(--rule);
}

.project-shot--none,
.project-shot--mark {
	background: none;
	box-shadow: none;
}

.project-shot--mark .mark {
	width: 3rem;
	height: 3rem;
	color: var(--slate);
}

.project-shot--mark .mark-on {
	opacity: 1;
}

.project-text h4 {
	margin: 0 0 0.3rem;
	font-size: 1.1875rem;
	font-weight: 650;
	line-height: 1.25;
}

.project-text p {
	margin: 0;
}

.project-text .project-role {
	margin: 0 0 0.1rem;
	font-weight: 500;
}

.project-text .project-years {
	margin: 0 0 0.45rem;
	color: var(--slate);
	font-size: 0.9375rem;
}

/* ---------- About and Kim ---------- */

.profile {
	display: grid;
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 56rem) {
	.profile {
		grid-template-columns: minmax(0, 36em) minmax(0, 24rem);
		justify-content: space-between;
		gap: 4rem;
	}

	.profile-photo {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
	}
}

.profile-photo {
	margin: 0;
}

.profile-photo img {
	width: 100%;
}

.motto {
	margin: 0.5rem 0 2.5rem;
	padding-left: 1.25rem;
	border-left: 3px solid var(--violet);
}

.motto blockquote {
	margin: 0;
	font-size: clamp(1.375rem, 2.4vw, 1.75rem);
	font-weight: 620;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.motto blockquote p {
	margin: 0;
}

.motto figcaption {
	margin-top: 0.6rem;
	color: var(--slate);
	font-size: 0.9375rem;
}

.beyond {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--rule);
}

.beyond li {
	padding: 0.9rem 0;
	border-top: 1px solid var(--rule);
}

.beyond strong {
	display: block;
	font-weight: 600;
}

.beyond span {
	color: var(--slate);
}

/* ---------- Life ---------- */

.page--intro {
	padding-bottom: 0;
}

.story {
	max-width: var(--page);
	margin: 0 auto;
	padding: 4rem var(--gutter) 0;
}

.story h3 {
	margin: 1.5rem 0 1.25rem;
	font-size: clamp(1.5rem, 2.8vw, 2rem);
	font-weight: 730;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.story-body {
	display: grid;
	gap: 1.5rem;
	align-items: start;
}

.story-body p {
	margin: 0;
	max-width: 34em;
}

.inset {
	width: 100%;
	max-width: 18rem;
}

@media (min-width: 48rem) {
	.story-body {
		grid-template-columns: 18rem minmax(0, 34em);
		gap: 2.5rem;
	}

	.story--flip .story-body {
		grid-template-columns: minmax(0, 34em) 18rem;
		justify-content: end;
	}

	.story--flip .inset {
		order: 2;
	}
}

.page.kim {
	padding-top: 5rem;
	padding-bottom: 0;
}

/* ---------- Life: koi ---------- */

.koi {
	margin-top: 6rem;
	background: var(--velvet);
	color: var(--platinum);
}

.koi-band {
	position: relative;
	overflow: hidden;
	height: clamp(14rem, 36vw, 28rem);
}

.koi-band > img {
	position: absolute;
	top: -12%;
	left: 0;
	width: 100%;
	height: 124%;
	max-width: none;
	object-fit: cover;
	will-change: transform;
}

.koi-inner {
	max-width: var(--page);
	margin: 0 auto;
	padding: 2rem var(--gutter) 4rem;
}

.koi h3 {
	margin: 0 0 1.25rem;
	color: #fff;
	font-size: 1.75rem;
	font-weight: 720;
	line-height: 1.1;
}

.koi-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.koi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
}

.koi-grid a {
	display: block;
	cursor: zoom-in;
}

.koi-grid img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--velvet);
	color: var(--platinum);
	border-top: 1px solid var(--velvet-line);
}

.site-footer-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	max-width: var(--page);
	margin: 0 auto;
	padding: 1.5rem var(--gutter) 2.5rem;
	font-size: 0.9375rem;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: var(--link-on-dark);
}

.footer-links {
	display: flex;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Koi photo viewer ---------- */

.lightbox {
	padding: 0;
	border: 0;
	background: transparent;
	max-width: min(96vw, 1600px);
	max-height: 96vh;
	overflow: visible;
}

.lightbox::backdrop {
	background: rgba(18, 26, 51, 0.92);
}

.lightbox img {
	max-width: min(96vw, 1600px);
	max-height: calc(96vh - 3.5rem);
	width: auto;
	height: auto;
}

.lightbox-bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 0.5rem;
}

.lightbox-close {
	padding: 0.55rem 1rem 0.5rem;
	border: 0;
	background: var(--platinum);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.lightbox-close:focus-visible {
	outline-color: var(--amber);
}

@media (prefers-reduced-motion: reduce) {
	.tab-indicator.is-ready,
	.hat h3,
	.mark-on { transition: none; }
	.window > img,
	.koi-band > img { will-change: auto; }
}
