* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

h1 {
    font-family: sans;
    text-align: center;
    font-variant: small-caps;
    font-size: 3em;
    color: #777;
    padding-bottom: 0.5em;
    margin: 0;
}

.sections {
    width: 100%;
    text-align: center;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    margin-bottom: 1em;
    background-color: #ccc;
    letter-spacing: 0.1em;
}

.sections .selected {
    background-color: white;
    display: inline-block;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

.intro {
}

.keywords {
    margin-top: 1em;
}

/* A keyword with additional details */
.group, .keyword {
    display: inline-block;
    vertical-align: top;
}

.keyword, .sub {
    font-variant: small-caps;
    font-size: 0.8em;
}
.keyword {
    padding: 0.2em 1em;
}
.sub {
    padding: 0 1em;
}

.keyword {
    background-color: #ccc;
    border: 1px solid #888;
    border-radius: 0.5em;
}
.group {
    cursor: pointer;
}

/* Don't dim the full timeline so that individual items may be un-dimmed below */
.dimmed .item {
    opacity: 0.2;
}
.dimmed .group {
    opacity: 0.2;
}
/* Overrides the above */
.dimmed .highlighted {
    opacity: 1;
}

.tl-container {
    height: 162.5em;
    overflow: hidden;
}

.years {
    padding-left: 10px;
    margin-bottom: 0;
    position: relative;
    left: -8em;
    width: 100vw;
    overflow: hidden;
}
.years li {
    /*    height: 100px;*/
    color: #ccc;
    border-bottom: 1px #ccc solid;
    font-size: 2.5em;
    list-style-type: none;
}

.timeline {
    position: relative;
    width: auto;
/*    overflow: hidden;*/
    height: 187.5em;
    margin-left: 8em; /* To hold the years */
    margin-top: 5em; /* To hold line titles */
}

.debug {
    display: none;
    position: fixed;
    bottom: 0px;
    left: 0px;
    background-color: white;
    border: 1px solid black;
}

/* responsive sizing */
.debug.mobile {
    display:block;
}

.head {
    width: 100%;
}
.years li {
    height: 3em;
}
.work {
    left: 0;
}
.education {
    left: 0;
}
.work-education {
    left: 0;
    width: 35%;
}
.company.tall {
    left: -2%;
    width: 43%;
}
.company {
    left: -1%;
    width: 41%;
}
.study-block {
    left: 41%;
    width: 58%;
}
.wide-study-block {
    left: -2%;
    width: 74%;
}

.publications {
    left: 42%;
}
.wide.item.publications {
    /* Keep space for .publications.right */
    width: 30%;
}

.publications.right {
    left: 73%;
}
.language {
    display:none;
}
.hi {
    font-weight: bold;
}
.item {
    width: 25%;
}
.wide.item {
    width:40%;
}
/* merged headers */    
.line.education {
    display:none;
}
.line.work {
    display:none;
}
.line.work-education {
    display:block;
}

@media only screen and (min-width: 50em) {

    .debug.mobile {
	display:none;
    }
    .debug.narrow {
	display:block;
    }
    .years {
	left: -11em;
    }
    .years li {
	height: 1.875em;
	font-size: 4em;
    }
    .timeline {
	height: 187.5em;
	margin-left: 11em;
    }
    .tl-container {
	height: 160.5em;
    }

    .line.work {
	width: 35%;
    }
    
    .company.tall {
	width: 43%;
    }
    .company {
	width: 41%;
    }
    .wide.item.publications {
	/* Keep space for .publications.right */
	width: 32%;
    }
    .publications {
	left: 42%;
    }
    .publications.line {
	width: 25%;
    }
    .publications.right {
	left: 75%;
    }
    .study-block {
	left: 41%;
	width: 57%;
    }
    .wide-study-block {
	width: 76%;
    }
    .language {
	display:block;
	left: 70%;
	text-align:right;
	padding-right: 5px;
    }
    
    .line.language {
	border-left: none;
	border-right: 1px solid black;
	width: 29%;
    }
    .language.item {
	width: 29%;
    }

    .item.language .dot {
	right: -3px;
    }
    .wide.item {
	width:41%;
    }
    /* merged headers */    
    .line.education {
	display:none;
    }
    .line.work {
	display:none;
    }
    .line.work-education {
	display:block;
    }
}

@media only screen and (min-width: 90em) {
    .debug.narrow {
	display:none;
    }
    .debug.wide {
	display:block;
    }

    .years li {
	height: 1.25em;
    }
    .timeline {
	height: 125em;
    }
    .tl-container {
	height: 109em;
    }
    
    .education {
	left: 25%;
    }
    
    .company.tall {
	width: 26%;
    }
    .company {
	width: 24%;
    }
    .publications {
	left: 50%;
    }
    .line.publications {
	width: 30%;
    }
    .study-block {
	left: 24%;
	width: 62%;
    }
    .wide-study-block {
	width: 72%;
    }

    .language {
	display:block;
	left: 87%;
	text-align:left;
    }

    .line.language {
	width: 13%;
	border-right: none;
	border-left: 1px solid black;
    }
    .item.language .dot {
	right:auto;
    }

    .language.item {
	width: 13%;
    }
    .item {
	width: 15%;
    }
    .wide.item {
	width:23%;
    }

    /* Separate headers */
    .line.education {
	display:block;
    }
    .line.work {
	display:block;
    }
    .line.work-education {
	display:none;
    }
    .wide.item.publications {
	/* Keep space for .publications.right */
	width: 20%;
    }
    .publications.right {
	left: 71%;
    }
}

@media print {

    .noprint {
	display: none;
    }
    .sections {
	display: none;
    }

    *:link {
	text-decoration: none;
    }

    .debug.mobile {
	display:none;
    }

    body {
	font-size: 7.5pt;
    }

    h1 {
	font-size: 3em;
	margin-bottom: 0.1em;
    }

    .debug.mobile {
	display:none;
    }
    .years {
	left: -9em;
    }
    .years li {
	font-size: 3em;
	height: 1.19em;
    }
    .timeline {
	margin-left: 9em;
	height: 89.25em;
	margin-top: 4em;
    }

    .line.work {
	width: 35%;
    }

    .tl-container {
	height: 78.97em;
    }

    .item {
	width: 16%;
	line-height: 85%;
    }
    .wide.item {
	width:29%;
    }
    
    .company.tall {
	width: 32%;
    }
    .company {
	width: 30%;
    }
    
    .education {
	left: 31%;
    }
    
    .publications {
	left: 60%;
    }
    .line.publications {
	width: 30%;
    }
    .publications.right {
	left: 82%;
    }
    
    .study-block {
	left: 30%;
	width: 68%;
    }
    .wide-study-block {
	width: 83%;
    }

    /* Separate headers */
    .line.education {
	display:block;
    }
    .line.work {
	display:block;
    }
    .line.work-education {
	display:none;
    }
    .wide.item.publications {
	/* Keep space for .publications.right */
	width: 21%;
    }
    .language {
	display:block;
	left: 70%;
	text-align:right;
	padding-right: 5px;
    }
    
    .line.language {
	border-left: none;
	border-right: 1px solid black;
	width: 29%;
    }
    .language.item {
	width: 29%;
    }

    .item.language .dot {
	right: -3px;
    }
}


.line {
    position: absolute;
    top: -2em;
    border-left: 1px solid;
    height: 100%;
    z-index: 1;
}

.education {
    border-color: #00f;
    color: #00f;
}
.education .dot {
    background: #00f;
    border-color: #00f;
}

.language {}
.language .dot {}

.research {
    border-color: #08f;
    color: #08f;
}
.research .dot {
    background: #08f;
    border-color: #08f;
}

.company {
    position: absolute;
    border: #f00 1px solid;
    background-color: #f98;
    color: #f30;
/*    writing-mode: vertical-rl;
    -webkit-writing-mode: vertical-rl;
    transform: rotate(180deg); */
    text-align: right;
    font-size:2em;
    opacity: 0.5;
}
.study-block, .wide-study-block {
    position: absolute;
    border: #00f 1px solid;
    background-color: #bcf;
    color: #03f;
    text-align: right;
    font-size:3em;
    opacity: 0.5;
}
.company span, .study-block span, .wide-study-block span {
    position: absolute;
    bottom: 0;
    right: 0;
}

.company.tall {
    font-size:3em;
}    

.work {
    left:0;
    border-color: #000;
    color: #000;
}
.work .dot {
    background: #000;
    border-color: #000;
}

/* Override browser's default blue for links */
*:link {
    color: inherit;
}

/* Keyword colours */

.php {
    border-color: #45e;
    color: #45e;
}
.php .dot {
    background-color: #45e;
}

.c {
    border-color: #5a0;
    color: #5a0;
}
.c .dot {
    background-color: #5a7;
}

.scala {
    border-color: #f08;
    color: #f08;
}

.scala .dot {
    background-color: #f08;
    border-color: #f08;
}

.java {
    border-color: #f00;
    color: #f00;
}
.java .dot {
    background-color: #f00;
    border-color: #f00;
}

.item {
    position: absolute;
    z-index: 3;
}

.dot {
    margin-left: -2px;
    width:1px;
    height:1px;
    border-width: 3px;
    border-style: solid;
    border-radius: 3px;
    position: absolute;
    box-shadow: 0px 0px 5px #000;
    z-index: 2;
}
.details {
    margin-left: 1em;
}
/* popups */
.hot {
    position: relative;
    display: inline-block; /* For popup relative positioning. */
    font-style: italic;
}
.hot .popup {
    display:none;
    position: absolute;
}
.hot:hover {
    font-weight: bold;
}
.hot:hover .popup {
    display:block;
    width: 150px;
    background-color: white;
    z-index: 3;
    border: 1px black solid;
    box-shadow: 2px 2px 5px #000;
    color: #333;
    font-weight: normal;
    font-style: normal;
}
.customer {
    color:black;
}
