body {
    margin: 0;
    line-height: normal;
}

:root {
    --accent: #61836D;
    --text:   #fff;
    --font:  'Roboto', sans-serif;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
body {
    font-family: var(--font);
    background: #000;
    color: var(--text);
    line-height: 1.4;
}

/* Intro section */
.intro {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 80%;
    margin: auto;
    padding: 10vh 2rem;
}

.intro__content {
    flex: 1 1 540px;
    min-width: 300px;
}

/* Text blocks */
.tagline {
    display: inline-block;
    background: var(--accent);
    padding: .25rem 1.5rem;
    border-radius: 20px 20px 20px 0;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.name  { font-size: 3.5rem; font-weight: 600; margin-bottom: .5rem; }
.title { font-size: 1.625rem; font-weight: 600; margin-bottom: 2rem; }

/* Contact list */
.contact { list-style: none; margin-bottom: 2rem; }

.contact li {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
    font-weight: 500;
    opacity: .9;
}

.icon { width: 14px; }

/* Social links */
.social      { display: flex; gap: 2rem; }
.social a    { display: inline-flex; width: 36px; height: 36px; opacity: .9; }
.social img  { max-width: 100%; }

/* Portrait */
.intro__image         { flex: 0 1 400px; display: flex; justify-content: center; }
.intro__image img     { width: 100%; max-width: 400px; border-radius: 50%; object-fit: cover; }
.link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5px;
    opacity: 0.9;
}

/* Top Bar navigation */
.header-nav {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 16px;
    box-sizing: border-box;
    gap: 16px;
    text-align: left;
    font-size: 17px;
    color: #fff;
    font-family: Roboto;
}

.topnav {
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    font-size: 18px;
}

.topnav a {
    float: left;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

.topnav a:hover {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: var(--accent);
    color: white;
}

/* Body text on slides*/
.text {
    padding-left: 20%;
    max-width: 80%;
    list-style-type: circle;
}

.text h1{
    line-height: 1.8;
}

.text h2{
    padding-top: 5px;
    line-height: 1.6;
}

.text ol, ul{
    padding-left: 45px;
}

.text hr{
    height: 2px;
    border-width: 0;
    color: var(--accent);
    background-color: var(--accent);
}

/* Flip Cards */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 300px;
    perspective: 1000px;
    margin-top: 25px;
    margin-left: 20%;
    display: inline-block;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-front {
    background-color: #bbb;
    color: black;
}

.flip-card-back {
    background-color: var(--accent);
    color: white;
    transform: rotateY(180deg);
}

/* Tablet and small laptop */
@media (max-width: 768px) {
    .intro {
        max-width: 95%;
        padding: 8vh 1.25rem;
        gap: 1.25rem;
    }

    .intro__content {
        flex: 1 1 100%;
        min-width: 0;
    }

    .intro__image { 
        flex: 1 1 100%;
        margin-top: 1rem;
    }

    .intro__image img { max-width: 260px; }

    .name { font-size: 2.5rem; }
    .title { font-size: 1.25rem; }

    .topnav { justify-content: center; flex-wrap: wrap; gap: 8px; }
    .topnav a { padding: 10px 12px; font-size: 16px; }

    .text { padding-left: 6%; max-width: 88%; }

    .flip-card { width: 240px; height: 240px; margin-left: 0; }
}

/* Mobile devices */
@media (max-width: 480px) {
    :root { --accent: #61836D; }

    body { font-size: 16px; }

    .header-nav { padding: 8px 10px; }

    .intro {
        padding: 6vh 0.75rem;
        gap: .75rem;
        align-items: center;
    }

    .intro__content { order: 2; }
    .intro__image   { order: 1; }

    .intro__image img { max-width: 200px; }

    .name { font-size: 2rem; }
    .title { font-size: 1.1rem; }

    .contact li { font-size: 0.95rem; }

    .social { gap: 1rem; }

    .topnav { font-size: 15px; }
    .topnav a { padding: 8px 10px; }

    .flip-card { width: 90%; max-width: 320px; height: auto; aspect-ratio: 1 / 1; margin: 1rem auto; display: block; }
    .flip-card-inner, .flip-card-front, .flip-card-back { height: 100%; }

    .text { padding-left: 5%; max-width: 94%; }
}
