
html, body, div, span, object, iframe, h1,h2,h3,h4,h5,h6,p,blockquote,pre,
abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,
var,b,i,dl,dt,dd,ol,ul,fieldset,form,label,legend,table,caption,tbody,tfoot,
thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,
hgroup,menu,nav,section,summary,time,mark,audio,video {
    border:0;
    font:inherit;
    font-size:100%;
    margin:0;
    padding:0;
    vertical-align:baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display:block;
}

html, body {
    background: #092008;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #222;
}

.clear { clear: both; }

p {
    font-size: 1em;
    line-height: 1.4em;
    margin-bottom: 20px;
    color: #444;
}


#cv {
    width: 90%;
    max-width: 800px;
    background: #f3f3f3;
    margin: 30px auto;
    padding: 0 30px;  
    box-sizing: border-box;
}

.mainDetails {
    display: flex;
    flex-wrap: wrap;       /* allows stacking on small screens */
    align-items: center;   /* vertically centers items */
    padding: 25px 35px;
    border-bottom: 2px solid #42b95c;
    background: #ededed;
}

#headshot {
    flex: 0 0 12.5%;       /* same as your old width */
    max-width: 100%;
    margin-right: 30px;
    border-radius: 50%;    /* makes it circular */
}

#headshot img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50%;
}

#name {
    flex: 1;               /* takes remaining space */
    min-width: 200px;      /* prevents name from shrinking too much */
}
#contactDetails { float: right; }

#contactDetails ul {
    list-style-type: none;
    font-size: 0.9em;
    margin-top: 2px;
}

#contactDetails ul li {
    margin-bottom: 3px;
    color: #444;
}

#contactDetails ul li a, a[href^=tel] {
    color: #444;
    text-decoration: none;
    transition: all .3s ease-in;
}

#contactDetails ul li a:hover {
    color: #88e68d;
}

section {
    border-top: 1px solid #42b95c;
    padding: 20px 0 20px;
}

section:first-child { border-top: 0; }

.sectionTitle {
    float: left;         
    width: 25%;
    text-align: right;   
    margin-left: -10px;  
}

.sectionContent {
    float: right;       
    width: 72.5%;
    overflow: auto;
}

.sectionTitle h1 {
    font-family: 'Rokkitt', Helvetica, Arial, sans-serif;
    font-style: italic;
    font-size: 2.2em;
    color: #1d3326;
}

.sectionContent h2 {
    font-family: 'Rokkitt', Helvetica, Arial, sans-serif;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.Technologies {
    list-style-type: none;
    margin-bottom: 50px;  
    font-size: 1em;
    color: #444;

    -moz-column-count: 1;
    -webkit-column-count: 1;
    column-count: 1;       
}

.Technologies li {
    margin-bottom: 10px;
}

@keyframes reset {
    0% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes fade-in {
    0% { opacity: 0; }
    40% { opacity: 0; }
    100% { opacity: 1; }
}

.instaFade {
    animation-name: reset, fade-in;
    animation-duration: 0.8s;  /* much faster than original 1.5s */
    animation-timing-function: ease-in;
}

.quickFade {
    animation-name: reset, fade-in;
    animation-duration: 0.5s;  /* faster than original 2.5s */
    animation-timing-function: ease-in;
}

.delayOne { animation-delay: 0, 0.2s; }
.delayTwo { animation-delay: 0, 0.4s; }
.delayThree { animation-delay: 0, 0.6s; }
.delayFour { animation-delay: 0, 0.8s; }
.delayFive { animation-delay: 0, 1s; }

.sectionContent, .sectionTitle {
    opacity: 0;              
    transform: translateY(20px); 
    transition: opacity 0.4s ease-in, transform 0.4s ease-in;
}

.sectionContent.visible, .sectionTitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/*
 * 1. Remove the old rule that hid the picture entirely on screens <= 800px.
 * We now want the picture to be visible, just repositioned.
 */
@media all and (max-width: 800px) {
    /* #headshot { display: none; } <--- REMOVED */
    .Technologies {
        -moz-column-count: 1;
        -webkit-column-count: 1;
        column-count: 1;
    }
}

/* * 2. Mobile Layout Block: Triggers at max-width 601px.
 * This is where we redefine the main content blocks.
 */
@media all and (max-width: 601px) {
    #cv { width: 95%; margin: 10px auto; min-width: 280px; }
    
    /* Reset layout for main details and sections */
    #name, #contactDetails { float: none; width: 100%; text-align: center; }
    .sectionTitle, .sectionContent { float: none; width: 100%; text-align: left; margin-left: 0; }
    .sectionContent::after { content: ""; display: table; clear: both; }
    .Technologies { -moz-column-count:1; -webkit-column-count:1; column-count:1; }

    /* The main details container must become a column for the reordering to work */
    .mainDetails {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* * Use Flexbox 'order' property to move elements.
     * Original HTML order: #headshot (1) -> #name (2) -> #contactDetails (3)
     * Desired mobile order: #name (1) -> #headshot (2) -> #contactDetails (3)
     */
    
    #name {
        order: 1; /* Joey Dronkers (Name and Title) goes first */
        margin-bottom: 10px; /* Add some space below the name block */
    }
    
    #headshot {
        order: 2; /* Headshot goes second, between name and contact details */
        margin-right: 0;
        margin-bottom: 20px;
        width: 30%; 
        /* Re-enable and resize headshot */
        display: block; 
    }
    
    #contactDetails {
        order: 3; /* Contact Details goes third */
    }

    #name h1 { font-size: 2em; }
    #name h4 { font-size: 0.9em; }
}

/* * 3. Smaller Phone Media Query (Optional, but kept for cleanup)
 */
@media all and (max-width: 480px) {
    .mainDetails { padding: 15px 15px; }
    section { padding: 15px 0 40px; }
    #mainArea { padding: 0 25px; }
}

