@media screen, print {
	:root {
		--anchor-active-color: #00b300;
		--background-color: #fff;
	}

	* {
		margin: 0;
		padding: 0;
	}

	html {
		background-color: #ccc;
		height: 100%;
	}

	a {
		color: var(--anchor-color);
		text-decoration: none;
	}
	a:hover {
		text-decoration: underline;
	}
	a:active {
		color: var(--anchor-active-color);
	}

	body {
		-moz-text-size-adjust: 100%; 
		-ms-text-size-adjust: 100%; 
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
		background-color: var(--background-color);
		color: var(--text-color);
		font-family: Helvetica, Arial, "Helvetica Neue", sans-serif;
		font-size: var(--text-base-size);
		line-height: 1.5;
		min-height: 100%;
	}

	body, 
	.position {
		align-content: flex-start;
		align-items: flex-start;
		display: flex;
		flex-flow: row wrap;
	}
	.tldr .position {
		width: 100%;
	}

	.active {
		color: var(--anchor-active-color);
		cursor: not-allowed;
	}

	.hide {
		display: none;
	}

	ol, 
	ul {
		list-style: none;
	}
	li {
		padding-bottom: 4px;
	}

	#header {
		background-color: var(--background-color);
		border-bottom: 0.75px solid var(--text-color);
		padding: 14px 24px 0 24px;
		position: sticky;
		top: 0;
		width: 100%;
		z-index: 75;
	}
	#header ul {
		display: flex;
	}
	.references #header ul {
		flex-flow: row wrap;
	}
	#header ul li {
		font-size: calc(var(--text-base-size) - 3px);
		margin-left: 10px;
	}
	#header ul li:first-child {
		margin-left: 0;
	}
	#header ul li::before {
		content: "\25AA";
		padding-right: 8px;
	}
	#header ul li:first-child::before {
		content: none;
		padding-right: 0;
	}

	#content {
		font-size: var(--text-base-size);
		padding: 0 24px 14px 24px;
		width: 100%;
	}

	#navigation {
		align-items: center;
		display: flex;
		flex-flow: row nowrap;
		font-size: calc(var(--text-base-size) - 4px);
		height: 20px;
		justify-content: flex-start;
		position: fixed;
		right: 0;
		top: 0;
		width: 70px;
		z-index: 100;
	}
	#navigation p {
		margin: 0;
	}
	#navigation a {
		color: #999;
		border-top-style: solid;
		border-top-width: 3px;
		display: inline-block;
		padding-top: 2px;
		text-align: center;
		width: 35px;
	}
	#navigation a:hover {
		text-decoration: none;
	}
	#navigation a.active {
		border-top-color: var(--anchor-active-color);
		color: var(--anchor-active-color);
		transition: 0.5s;
	}

	ul.literal {
		list-style: outside square;
		padding: 0 20px 0 17px;
	}

	h1, 
	h2, 
	h3 {
		font-weight: normal;
	}
	h1 {
		color: #000;
		font-size: calc(var(--text-base-size) + 10px);
		font-weight: 600;
	}
	h2 {
		border-bottom: 1px solid #ccc;
		color: #999;
		font-size: calc(var(--text-base-size) + 1px);
		margin: 0 0 4px 0;
		padding-top: 12px;
	}
	h2 + p,
	h2 + ul.literal {
		padding-bottom: 1px;
		padding-top: 4px;
	}
	#summary h2 {
		display: none;
	}
	#summary p.tldr {
		padding-top: 8px;
		/* white-space: break-spaces;*/
	}

	ol li {
		background-color: var(--background-color);
	}
	ol > li {
		display: flex;
		flex-flow: row wrap;
		justify-content: space-between;
	}

	h3, 
	h3 + p, 
	.role, 
	.timeframe {
		position: sticky;
		z-index: 50;
	}

	h3, 
	h3 + p {
		background-color: var(--background-color);
		color: #666;
		flex: 1 1;
		font-size: calc(var(--text-base-size) + 0.5px);
		font-weight: 600;
		padding-top: 4px;
		padding-bottom: 2px;
		top: 68px;
	}
	.tldr ol > li {
		justify-content: flex-start;
	}
	.tldr h3 {
		flex: unset;
	}

	h3 + p {
		text-align: right;
		z-index: 60;
	}
	.tldr h3 + p {
		text-align: left;
	}
	.tldr h3 + p::before {
		content: ", ";
	}
	.role {
		top: 95px;
		z-index: 45;
	}
	.tldr .role,
	.tldr .timeframe {
		position: static;
	}
	.tldr .role {
		padding-bottom: 0;
	}
	.role, 
	.timeframe {
		font-weight: 600;
		padding-bottom: 2px;
		width: 100%;
	}
	.timeframe {
		top: 118px;
		z-index: 40;
	}
	.timeframe::before {
		content: "(";
	}
	.timeframe::after {
		content: ")";
	}
	.tldr .timeframe {
		color: #777;
		font-size: 90%;
		font-weight: 400;
		padding-bottom: 8px;
	}
	.tldr .timeframe::before {
		content: "";
	}
	.tldr .timeframe::after {
		content: "";
	}
	.activities {
		padding-bottom: 10px;
	}
	.summary {
		margin-bottom: 4px;
	}

	/* everything else is not for the main resume page */
	.testimonials #content {
		align-items: flex-start;
		display: flex;
		flex-flow: row wrap;
		justify-content: space-around;
		padding-bottom: 40px;
		width: 100%;
	}
	.testimonials #content h2, 
	.testimonials #content form {
		background-color: #fff;
		position: sticky;
		width: 100%;
	}
	.testimonials #content h2 {
		margin-bottom: 0;
		top: 71px;
		z-index: 50;
	}
	.testimonials #content p {
		width: 100%;
	}
	.testimonials #content form {
		top: 105.5px;
		z-index: 40;
	}
	.references #content li {
		padding-bottom: 14px;
	}
	.references #content p {
		padding-bottom: 10px;
	}

	.references > p, 
	.testimonials > p {
		padding-left: 10px;
	}
	form {
		border-bottom: 1px solid #ccc;
		margin-bottom: 8px;
		padding-bottom: 8px;
		padding-top: 8px;
	}
	fieldset {
		border: none;
		position: relative;
	}
	legend, 
	button {
		font-family: inherit;
		font-size: 100%;
		display: inline;
	}
	legend {
		left: 0;
		position: absolute;
		top: 0;
	}
	button:first-of-type {
		margin-left: 66px;
	}
	button {
		background-color: transparent;
		border: none;
		color: var(--anchor-color);
		margin-right: 25px;
	}
	button:hover {
		cursor: pointer;
	}
	button.active {
		color: var(--anchor-active-color);
		cursor: not-allowed;
	}
	blockquote {
		border: 1px solid #ddd;
		border-radius: 12px;
		margin: 0 0 18px 0;
		padding: 12px 16px 12px 16px;
	}
	blockquote.engineering p {
		font-family: Roboto, Inconsolata, Courier, monospace;
	}
	blockquote.management p {
		font-family: "Times New Roman", Times, serif;
	}
	blockquote.ux p {
		font-family: Helvetica, Arial, "Helvetica Neue", sans-serif;
	}
	blockquote.product p {
		font-family: Tahoma, Geneva, sans-serif;
	}
	blockquote.qa p {
		font-family: Garamond, "Palatino Linotype", "Book Antiqua", Palatino, serif;
	}
	blockquote p {
		font-size: 110%;
		margin-bottom: 12px;
	}
	blockquote footer {
		color: #6e6e6e;
		text-align: right;
	}
}


/* ********************* SCREEN ONLY ********************** */

@media only screen {
	:root {
		--anchor-color: #b30000;
		--text-base-size: 14px;
		--text-color: #0a0a0a;
	}
	.print-only {
		display: none;
	}
}


/* ********************* PRINT ONLY ********************** */


@media only print {
	:root {
		--anchor-color: #0000b3;
		--text-color: #000;
		--text-base-size: 9pt; /* was 9.5pt */
	}

	.screen-only {
		display: none;
	}

	#navigation {
		display: none;
	}

	a.print::after {
		color: var(--text-color);
		content: " [" attr(href) "]";
	}

	.references > p, 
	.testimonials > p, 
	.testimonials #content form {
		display: none;
	}
	.references #header, 
	.references #content, 
	.testimonials #header, 
	.testimonials #content {
		display: block;
	}

	.references #header ul li:last-child {
		display: none;
	}

	.testimonials #content blockquote{
		display: block;
		width: 80%;
	}

	#header, 
	#content {
		padding-left: 0;
		padding-right: 0;
	}

	h3, 
	.role {
		position: sticky;
	}

	html, 
	body {
		background-color: #fff;
		display: block;
		min-height: 0;
	}
	/* Firefox struggles to print consistently when flex is used */
	ol > li {
		display: block;
	}
	h3 {
		float: left;
	}
	h3 + p {
		float: left;
	}
	.position {
		clear: both;
	}
}

/* ***************** LAYOUTS **************************** */

/* annoying quirk with four items in the header */
@media screen and (max-width: 302px) {
	#header ul li {
		font-size: 2.2vw;
	}
}
@media screen and (min-width: 302px) and (max-width: 399px) {
	#header ul li {
		font-size: 2.8vw;
	}
}

@media screen and (min-width: 640px), 
        print and (min-width: 640px) {
	#header {
		align-content: flex-end;
		align-items: center;
		display: flex;
		flex-flow: column nowrap;
		padding-top: 6px;
	}

	h3, 
	h3 + p {
		top: 63px;
		width: auto;
	}

	.tldr .position {
		flex-flow: row-reverse wrap;
		justify-content: flex-end;
	}
	.role, 
	.timeframe {
		top: 90px;
		width: auto;
	}
	.tldr .role {
		padding-left: 8px;
		width: auto;
	}
	.timeframe {
		flex: 1 1;
		position: sticky;
		text-align: left;
	}
	.timeframe::before {
		content: "\0000a0(";
	}
	.tldr .timeframe {
		background-color: inherit;
		flex: 0;
		font-size: 100%;
		padding-left: 20px;
		position: inherit;
		text-align: inherit;
		white-space: nowrap;
		width: auto;
	}
	.tldr .timeframe::before {
		content: "";
	}
	.tldr .timeframe::after {
		content: ": ";
	}
	.activities {
		margin-top: 0px;
	}

	blockquote {
		width: 40%;
	}

	.testimonials #content h2 {
		top: 63px;
	}
	.testimonials #content form {
		top: 97.5px;
	}

	.references #header ul {
		flex-flow: row nowrap;
	}
	.references #header ul li {
		margin-left: 10px;
		width: auto;
	}
	.references #header ul li:first-child {
		margin-left: 0;
	}
	.references #header ul li:first-child::before {
		content: none;
		padding-right: 0;
	}

}


@media only screen and (min-width: 860px),
	   only screen and (orientation: landscape) and (min-width: 840px) {

	body.resume, 
	body.references, 
	body.testimonials {
		align-items: flex-start;
		display: flex;
		flex-flow: row nowrap;
		justify-content: space-between;
		max-width: 999px;
	}
	body.references, 
	body.testimonials {
		flex-flow: row wrap;
	}

	#navigation {
		align-items: flex-start;
		flex-flow: column nowrap;
		margin-left: calc(100% - 39px);
		order: 3;
		position: absolute;
		top: 0;
		width: 39px;
	}

	#header {
		align-items: flex-start;
		border-bottom: none;
		order: 2;
		padding: 17px 0 20px 0;
		position: sticky;
		right: 0;
		width: 23%;
	}

	h1 {
		font-size: calc(var(--text-base-size) + 14px);
		order: 1;
	}

	.testimonials #content h2 {
		padding-top: 24px;
		top: 0;
		width: 100%;
	}

	#header ul {
		display: block;
		list-style: outside square;
		margin-left: 14px;
		order: 2;
	}
	#header ul li {
		display: list-item;
		font-size: var(--text-base-size);
		margin-left: 0;
	}
	.references #header ul li {
		margin-left: 0;
	}
	#header ul li::before {
		content: none;
		padding-right: 0;
	}

	.resume #content, 
	.references #content, 
	.testimonials #content {
		order: 1;
		padding-top: 0;
		width: 70%;
	}

	h2 {
		background-color: var(--background-color);
		padding-top: 24px;
		position: sticky;
		top: 0;
		width: 100%;
		z-index: 75;
	}
	#summary h2 {
		display: block;
	}

	h3, 
	h3 + p {
		top: 47px;
	}

	.role, 
	.timeframe {
		top: 72px;
	}

	#navigation a {
		border-right-width: 4px;
		border-right-style: solid;
		border-top: none;
		line-height: 20px;
	}
	#navigation a.active {
		border-right-color: var(--anchor-active-color);
	}

	.testimonials #content form {
		font-size: 90%;
		position: sticky;
		top: 46.5px;
	}

	.references > p, 
	.testimonials > p {
		order: 3;
		width: 100%;
	}

}


@media only screen and (min-width: 1000px) {
	body {
		margin-left: auto;
		margin-right: auto;
	}
}
