* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #060709;
    background-image: url("../media/background-blue.jpg");
    background-repeat: no-repeat;
    background-size: 100%;
}

div#main_container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-flow: column;
    margin: 6em auto 0;
    width: 55em;
}

header {
    font-family: sans-serif;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 1.1em;
    text-transform: uppercase;
}

header nav ul {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-flow: row nowrap;
    list-style: none;
    margin-left: 3.4em;
    position: relative;
    top: 1px;
    z-index: 1;
}

header nav ul li {
    background-color: rgba(255, 255, 255, 1);
    background-image: url('../media/exclusive_paper.png');
    border: 1px 1px 0 1px #000;
    margin-right: 0.5em;
}

header nav ul li a {
    color: #666;
    display: block;
    padding: 0.25em 0.5em;
    text-decoration: none;
}

header nav ul li.active a {
    text-decoration: underline;
}

header nav ul li:hover a {
    color: #000;
    background-color: #a8b4ba;
}

header nav ul li a:active {
    background-color: #694645;
    background-color: #ffffff;
    color: #000000;
}

header nav ul li:last-child {
    margin-right: 0;
}

div#inner_container {
    background-image: url('../media/exclusive_paper.png');
    background-repeat: repeat;
    background-size: 50% 50%;
    border: 4px #000 double;
    height: 39em;
    width: 100%;
}

body.cv div#inner_container {
    height: 38em;
}

div#wrapper {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-flow: column;
    flex-flow: column;
    height: 100%;
    margin: 0 auto;
    position: relative;
    width: 90%;
}

div#logo {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-flow: column;
    flex-flow: column;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

div#logo h1 {
    border-bottom: 2px solid #778691;
    font-family: sans-serif;
    font-family: Georgia, serif;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 3.9em;
    font-weight: normal;
    margin-top: 2.5em;
    text-decoration: none;
    text-shadow: 1px 2px 3px #555;
    text-transform: uppercase;
}

div#logo a {
    color: #333;
    text-decoration: none;
}

div#logo h2 {
    color: #666;
    font-size: 1.4em;
    font-weight: normal;
    letter-spacing: 2px;
    margin: 0.5em 0 0 0;
    text-transform: uppercase;
}

footer {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row;
    -webkit-box-pack: justify;
    flex-flow: row;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    font-family: Habibi;
    font-size: 1.2em;
    letter-spacing: 3px;
    position: absolute;
    bottom: 3.5em;
    width: 100%;
}

footer div#right_footer a {
    color: #486a91;
}

/* BODY PROFILE */

div#inner_container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-flow: column;
    flex-flow: column;
}

div#top_container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row;
    flex-flow: row;
    margin: 1em 0 1em 0;
}

div#top_left,
div#top_right {
    width: 50%;
}

div#top_left h1 {
    font-family: sans-serif;
    font-family: Georgia, serif;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 2.3em;
    font-weight: normal;
    text-align: center;
    text-shadow: 1px 2px 3px #555;
    text-transform: uppercase;
}

div#top_left h1 a {
    border-bottom: 1px solid #778691;
    color: #000;
    text-decoration: none;
}

div#top_left h2 {
    color: #444444;
    font-size: 1em;
    font-weight: normal;
    letter-spacing: 2px;
    margin-top: 0.5em;
    text-align: center;
    text-transform: uppercase;
}

div#top_right {
    position: relative;
}

div#top_right h3 {
    background-color: #694645;
    border-radius: 0.3em;
    box-shadow: 3px 2px 4px #000000;
    font-family: sans-serif;
    font-size: 1em;
    text-align: center;
    position: absolute;
    top: 0.7em;
    right: 0;
    width: 9em;
}

div#top_right h3:hover a {
    background-color: #eeefff;
    color: #694645;
}

div#top_right h3 a {
    border-radius: 0.3em;
    color: #eeefff;
    display: block;
    padding: 0.5em 1em 0.5em 1em;
    text-decoration: none;
}

div#bottom_container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row nowrap;
    flex-flow: row nowrap;
    height: 26em;
    -webkit-box-pack: justify;
    justify-content: space-around;
    height: 100%;
}

div#bottom_left,
div#bottom_right {
    width: 50%;
}

div#bottom_left figure#inner_image {
    display: none;
}

div#bottom_left p {
    margin-bottom: 1em;
}

div#bottom_left p:last-child {
    margin-bottom: 0;
}

div#bottom_right {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-flow: column;
    -webkit-box-pack: justify;
    text-align: center;
}

img#inner_image {
    display: none;
}

div#bottom_right img,
div#bottom_right div#caption {
    margin: 0 auto;
    width: 75%;
}

div#bottom_right div#caption {
    border: 1px solid #ccc;
    margin-top: 0.7em;
}

div#bottom_right div#caption p {
    padding: 0.25em;
    text-align: center;
}

div#bottom_right div#caption p a {
    color: #486a91;
}

/* TABLES */

section.presentation {
    width: 100%;
}

th {
    font-family: sans-serif;
    font-size: 0.85em;
    font-weight: normal;
    text-decoration: underline;
}

th,
td {
    padding: 0.3em;
    text-align: left;
}

th.center-header {
    text-align: center;
}

table {
    display: table;
    border-collapse: collapse;
    font-size: 0.94em;
    width: 100%;
}

table#education {
    margin: 0 0 1em 0;
}

td {
    display: table-cell;
    border: 1px solid #000000;
}

td h3 {
    font-family: sans-serif;
    margin: 0 0 7px 0;
}

td p {
    font-size: 1.1em;
}

td.institution {
    width: 21em;
}

td.institution span {
    display: none;
}

td.period {
    text-align: center;
    width: 7em;
}

tr:hover {
    background-color: #a8b4ba;
}

table#education tr:hover {
    cursor: default;
}

table#experience h3 span.title {
    font-family: serif;
    font-family: "Sanchez", serif;
    font-size: 1em;
    text-decoration: underline;
}

table#experience h3 span.year {
    color: grey;
    display: block;
    font-size: 0.75em;
    font-weight: normal;
    position: relative;
    left: 1em;
    top: 0.25em;
    text-decoration: none;
}

table#experience td.period:hover,
table#experience td.position:hover {
    cursor: default;
}

table#experience td.institution {
    text-decoration: underline;
}

tr:hover th {
    background-color: #ffffff;
    cursor: default;
}

table a,
table a:visited {
    color: #000000;
}

body.reference h4 {
    font-family: sans-serif;
    margin: 1.5em 0 -1em 0;
}

ul#reference {
    margin-top: 1.5em;
}

ul#reference li {
    font-size: 0.95em;
    list-style-type: square;
    margin: 1em 1.5em 1em 1.5em;
}

div.details {
    display: none;
}

table#experience tr td {
    position: relative;
}

table#experience td.position div {
    background-color: white;
    position: absolute;
    top: -95px;
    right: -20px;
    padding: 20px;
    max-width: 400px;
    border: 2px solid black;
    border-radius: 10px;
    box-shadow: 3px 5px 5px #444;
}

table#experience td.toggleDetails:hover {
    cursor: help;
}

@media screen and (min-width: 1366px) and (max-width: 1439px) and (orientation: landscape) {
    div#main_container {
        margin: 1.5em auto 0;
    }

    td.period {
        width: 7em;
    }

}

@media screen and (min-width: 1280px) and (max-width: 1365px) and (orientation: landscape) {
    div#main_container {
        margin: 3em auto 0;
    }

    td.period {
        width: 6em;
    }

}

@media screen and (min-width: 1024px) and (max-width: 1279px) and (min-height: 700px) and (orientation: landscape) {
    div#main_container {
        margin: 5em auto 0;
    }

    td.period {
        width: 6em;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) and (min-height: 650px) and (max-height: 699px) and (orientation: landscape) {
    div#main_container {
        margin: 2em auto 0;
    }

    td.period {
        width: 6em;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) and (max-height: 649px) and (orientation: landscape) {
    div#main_container {
        margin: 0.5em auto 0;
    }

    td.period {
        width: 5em;
    }
}

@media screen and (min-width: 960px) and (max-width: 1023px) and (orientation: landscape) {
    div#main_container {
        margin: 2em auto 0;
    }

    td.period {
        width: 5em;
    }
}

@media screen and (min-width: 800px) and (max-width: 959px) and (orientation: landscape) {
    div#main_container {
        margin: 0.5em auto 0;
        width: 45em;
    }

    div#inner_container {
        height: 26.5em;
        width: 100%;
    }

    body.profile div#inner_container,
    body.cv div#inner_container {
        height: 40em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 3em;
        margin-top: 2.5em;
    }

    div#logo h2 {
        font-size: 1.2em;
    }

    footer {
        bottom: 1em;
        font-size: 1.1em;
        letter-spacing: 2px;
    }

    div#top_left h1 {
        font-size: 1.8em;
        margin-top: 0.4em;
    }

    div#top_left h2 {
        font-size: 0.95em;
    }
}

@media screen and (min-width: 720px) and (max-width: 799px) and (orientation: landscape) {
    div#main_container {
        margin: 0.5em auto 0;
        width: 42em;
    }

    div#inner_container {
        height: 28.5em;
        width: 100%;
    }

    body.profile div#inner_container {
        height: 41em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 45em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 3em;
        margin-top: 2.5em;
    }

    div#logo h2 {
        font-size: 1.2em;
    }

    footer {
        bottom: 1em;
        font-size: 1.1em;
        letter-spacing: 2px;
    }

    div#top_left h1 {
        font-size: 1.8em;
        margin-top: 0.4em;
    }

    div#top_left h2 {
        font-size: 0.95em;
    }
}

@media screen and (min-width: 640px) and (max-width: 719px) and (orientation: landscape) {
    header {
        font-size: 0.95em;
    }

    header nav ul {
        margin-left: 1em;
    }

    div#main_container {
        margin: 1em auto 0;
        width: 27em;
    }

    div#inner_container {
        height: 14em;
        width: 100%;
    }

    body.profile div#inner_container {
        height: 39em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 56em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2em;
        margin-top: 1.25em;
    }

    div#logo h2 {
        font-size: 0.95em;
    }

    footer {
        bottom: 1em;
        font-size: 0.95em;
        letter-spacing: 2px;
    }

    footer span {
        display: none;
    }

    div#top_container {
        margin-top: 0.5em;
        margin-bottom: 1em;
    }

    div#top_left {
        width: 70%;
    }

    div#top_left h1 {
        font-size: 1.5em;
    }

    div#top_left h2 {
        font-size: 0.8em;
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 0.8em;
        top: 0.5em;
        right: 0;
        width: 5em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left p {
        font-size: 1em;
        margin-bottom: 0.5em;
        text-align: justify;
    }

    div#bottom_right {
        display: none;
        width: 30%;
        height: 16em;
    }

    div#bottom_right p {
        font-size: 0.9em;
    }

    div#bottom_right p span {
        display: none;
    }

    div#bottom_left img#inner_image {
        display: block;
        float: right;
        height: 9em;
        margin: 0.5em 1em 1em 1em;
    }

    td.institution {
        width: 10em;
    }
}

@media screen and (max-width: 639px) and (orientation: landscape) {
    header {
        font-size: 0.95em;
    }

    header nav ul {
        margin-left: 1em;
    }

    div#main_container {
        margin: 0.75em auto 0;
        width: 25em;
    }

    div#inner_container {
        height: 14em;
        width: 100%;
    }

    body.profile div#inner_container {
        height: 40em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 56em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2em;
        margin-top: 1.4em;
    }

    div#logo h2 {
        font-size: 1em;
    }

    footer {
        bottom: 1em;
        font-size: 0.9em;
        letter-spacing: 2px;
    }

    footer span {
        display: none;
    }

    div#top_left {
        width: 70%;
    }

    div#top_left h1 {
        font-size: 1.5em;
        margin-top: 0;
    }

    div#top_left h2 {
        font-size: 0.75em;
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 0.8em;
        top: 0.5em;
        right: 0;
        width: 5em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left p {
        margin-bottom: 0.5em;
        text-align: justify;
    }

    div#bottom_right {
        display: none;
    }

    div#bottom_right p {
        font-size: 0.9em;
    }

    div#bottom_right p span {
        display: none;
    }

    div#bottom_left img#inner_image {
        display: block;
        float: right;
        height: 9em;
        margin: 0.5em 1em 1em 1em;
    }

    td.institution {
        width: 10em;
    }

    td.period {
        width: 5em;
    }

}

@media screen and (min-width: 1200px) and (orientation: portrait) {
    div#main_container {
        width: 90%;
    }

    div#top_left h1 {
        font-size: 2em;
    }
}

@media screen and (min-width: 800px) and (max-width: 1199px) and (orientation: portrait) {
    div#main_container {

        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 21em;
    }

    body.profile div#inner_container {
        height: 34em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 47em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2.3em;
        margin-top: 2em;
    }

    div#top_left {
        width: 70%
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 0.8em;
        top: 0.5em;
        right: 0;
        width: 5em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#top_left h1 {
        font-size: 1.8em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: block;
        float: right;
        height: 13em;
        margin: 0.5em 1em 1em 1em;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 1em;
    }

    footer span {
        display: none;
    }

    td.institution {
        width: 40%;
    }

    td.period {
        width: 20%;
    }
}

@media screen and (min-width: 768px) and (max-width: 799px) and (orientation: portrait) {
    div#main_container {
        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 21em;
    }

    body.profile div#inner_container {
        height: 26em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 40em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2.8em;
        margin-top: 1.5em;
    }

    div#top_left {
        width: 70%
    }

    body.profile div#top_left h2 {
        margin-bottom: 2em;
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 1em;
        top: 0.5em;
        right: 0;
        width: 8em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#top_left h1 {
        font-size: 1.8em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: block;
        float: right;
        height: 13em;
        margin: 0.5em 1em 1em 1em;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 1em;
    }

    footer span {
        display: none;
    }

    td.institution {
        width: 40%;
    }

    td.period {
        width: 20%;
    }
}

@media screen and (min-width: 720px) and (max-width: 767px) and (orientation: portrait) {
    div#main_container {
        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 21em;
    }

    body.profile div#inner_container {
        height: 28em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 40em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2.8em;
        margin-top: 1.5em;
    }

    div#top_left {
        width: 70%
    }

    body.profile div#top_left h2 {
        margin-bottom: 2em;
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 1em;
        top: 0.5em;
        right: 0;
        width: 8em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#top_left h1 {
        font-size: 1.8em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: block;
        float: right;
        height: 13em;
        margin: 0.5em 1em 1em 1em;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 1em;
    }

    footer span {
        display: none;
    }

    td.institution {
        width: 40%;
    }

    td.period {
        width: 20%;
    }
}

@media screen and (min-width: 600px) and (max-width: 719px) and (max-height: 1200px) and (orientation: portrait) {
    div#main_container {
        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 21em;
    }

    body.profile div#inner_container {
        height: 33em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 44em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 2.8em;
        margin-top: 2em;
    }

    div#top_left {
        width: 70%
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 1em;
        top: 0.5em;
        right: 0;
        width: 8em;
    }

    div#top_right h3 a {
        padding: 0.25em;
    }

    div#top_left h1 {
        font-size: 1.8em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: block;
        float: right;
        height: 13em;
        margin: 0.5em 1em 1em 1em;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 1em;
    }

    footer span {
        display: none;
    }

    td.institution {
        width: 40%;
    }

    td.period {
        width: 20%;
    }
}

@media screen and (min-width: 480px) and (max-width: 639px) and (orientation: portrait) {
    header {
        font-size: 0.9em;
    }

    header nav ul {
        margin-left: 0.5em;
    }

    header nav ul li {
        margin-right: 0.5em;
    }

    header nav ul li a {
        padding: 0.25em 0.5em;
    }

    div#main_container {
        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 16em;
    }

    body.profile div#inner_container {
        height: 33em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 52em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        clear: both;
        font-size: 1.8em;
        margin-top: 2em;
    }

    div#logo h1 a {
        display: block;
    }

    div#logo h2 {
        font-size: 1em;
    }

    div#top_left {
        width: 70%
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 0.8em;
        top: 0;
        right: 0;
        width: 5em;
    }

    div#top_right h3 a {
        padding: 0.1em;
    }

    div#top_left h1 {
        font-size: 1.3em;
    }

    div#top_left h2 {
        font-size: 0.9em;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: none;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 1em;
        letter-spacing: 1px;
        bottom: 2em;
    }

    footer span {
        display: none;
    }

    td.institution {
        width: 40%;
    }

    td.period {
        width: 20%;
    }

}

@media screen and (max-width: 479px) and (orientation: portrait) {

    div#bottom_container {
        height: 55em;
    }

    header {
        font-size: 0.9em;
    }

    header nav ul {
        margin-left: 0.5em;
    }

    header nav ul span {
        display: none;
    }

    header nav ul li {
        margin-right: 0.5em;
    }

    header nav ul li a {
        padding: 0.25em 0.5em;
    }

    div#main_container {
        margin-top: 2em;
        width: 90%;
    }

    div#inner_container {
        height: 25em;
    }

    body.profile div#inner_container {
        height: 44em;
        margin-bottom: 2em;
    }

    body.cv div#inner_container {
        height: 61em;
        margin-bottom: 2em;
    }

    div#logo h1 {
        font-size: 1.5em;
        margin-top: 2.3em;
    }

    div#logo h2 {
        font-size: 0.9em;
    }

    div#top_left {
        width: 70%
    }

    div#top_right {
        width: 30%;
    }

    div#top_right h3 {
        font-size: 0.8em;
        top: 0;
        right: 0;
        width: 5em;
    }

    div#top_right h3 a {
        padding: 0.1em;
    }

    div#top_left h1 {
        font-size: 1.1em;
    }

    div#top_left h2 {
        display: none;
    }

    div#bottom_left {
        width: 100%;
    }

    div#bottom_left img {
        display: none;
    }

    div#bottom_right {
        display: none;
    }

    footer {
        font-size: 0.8em;
        letter-spacing: 1px;
        bottom: 1em;
    }

    footer span {
        display: none;
    }

    table {
        font-size: 0.9em;
    }

    td.institution {
        max-width: 7em;
    }

    td.institution span {
        display: inline-block;
    }

    td.period {
        min-width: 20%;
    }

    td.position {
        width: 40%;
    }

    td.position span {
        display: none;
    }
}