/*! HTML5 Boilerplate v5.2.0 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */
html {
    color: #666;
    font-size: 0.85em;
    word-break: break-word;
    font-family: "微軟正黑體","Microsoft JhengHei",sans-serif;
}

@font-face {
    font-family: "draft";
    src: local("HuiFont"),
         local("田氏方筆刷体繁"),
         url(../fonts/HuiFont.ttf);
    font-display: swap;
}
/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
a, a:link, a:visited{
    color:#009534;
    text-decoration: none;
}
a:hover, a:focus{
    color:#00C043;
    text-decoration: none;
}

h2{
    margin-top: 0px;
    margin-bottom: 5px;    
    color: #333;
}
.bold{
    font-weight: bold;
}
.bgblack{
    background-color: #000;
}
.subtitle{
    font-weight: bold;
    border-bottom: 3px solid #53D28A;
    margin-bottom: 2px;
    color: #333;
}
.italic{
    font-style:italic;
    font-weight: bold;
}
.container{
    margin: 0px auto;
    width: 85%;
}
.detail{
    width: 80%;
    margin: 0px auto;
    font-size: 1.1em;
    letter-spacing: 1px;
    line-height: 1.8em;
    /*text-align: justify;*/
    text-justify:inter-ideograph;
    max-width: 1000px;
    border-bottom: 1px solid #E8E8E8;
    padding: 40px 0px 30px 0px;
}
.detail:after {
    content: '';
    clear: both;
    display: block;
}
.detail-left{
    float: left;
    margin:0px 0px 0px 30px;
}
.detail-left > p{
    font-size:1em;
}
.detail-right{
    margin:0px 0px 0px 250px;
    position: relative;
}
.detail-right-content{
    margin-top: 40px;
}
.detail-right-content:first-child{
    margin-top: 0px;
}
.detail-right-content > .bold{
    font-size: 1.4em;
}
.mark{
    background-image: -webkit-linear-gradient(transparent 31%, #ff3 31%, #ff3 55%, transparent 61%);
    background-image: -o-linear-gradient(transparent 31%, #ff3 31%, #ff3 55%, transparent 61%);
    background-image: linear-gradient(transparent 31%, #ff3 31%, #ff3 55%, transparent 61%);
}
.mfp-content{

    margin: 0px auto;
    font-size: 1.1em;
    letter-spacing: 1px;
    line-height: 1.8em;
    /*text-align: justify;*/
    text-justify:inter-ideograph;
}
/* ==========================================================================
   navbar
   ========================================================================== */
#navbar{
    position: fixed;
    text-align: center;
    width: 100%;
    padding: 8px 0px 8px 0px;
    z-index: 99;
}
#navbar a{
    margin: 0px 15px 0px 15px;
    font-weight: bold;
    font-size: 1.1em;
}
#navbar a, #navbar a:link, #navbar a:visited{
    color:#fff;
    text-decoration: none;
}
#navbar a.active{
    color:#53D28A
}

/* ==========================================================================
   header#top
   ========================================================================== */

header#top, #bg-small{
    position: relative;
    overflow: hidden;
    background-color: #000;
    height: 100vh;
    min-height: 500px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover !important;
    text-align: center;
}
#title {
    visibility: hidden;
}
#bg-small {
    position: absolute;
    background-image: url("../img/top_bg_small.jpg");
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    transition: opacity 1s linear;
    filter: blur(50px);
    /* this is needed so Safari keeps sharp edges */
    transform: scale(1.2);
}
#bg-small.loaded {
    opacity: 0;
}
header:before{
    content: '';
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}
header .container{
    position: relative;
    margin: 0px auto;
    width: 85%;
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    border: 1px solid #fff;
    max-width: 950px;
    z-index: 2;
}
.textarea{
    width: 100%;
    color:#fff;
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.5);
}
header h1{
    font-size: 5em;
    margin: 0 0 40px 0;
    font-family:"draft","微軟正黑體","Microsoft JhengHei", sans-serif;
}
header .detail{
    color: #ddd;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1.3em;
    border: none;
    padding: 0px;
}
header#top a, header#top a:link, header#top a:visited{
    color: #fff;
}

/* ==========================================================================
   section#about
   ========================================================================== */
section#about, section.portfolio{
    background-color: #eee;
    position: relative;
}

section#about a, section#about a:link, section#about a:visited{
    color: #555;
    margin-right: 3px;
}
section#about a:hover, section#about a:focus{
    color: #888;
}
div#profile-pic{
    background: url('../img/profile.png');
    background-size: cover;
    background-position: center center;
    width: 140px;
    height: 140px;
    border-radius: 100%;
}
.about-detail {
    float: left;
    width: 50%;
}
#radar-chart{
    max-width: 350px;
    /*background-color: #ff3; */
}
section#about .detail-left h2{
    margin-top: 20px;
}

/* ==========================================================================
   section#resume
   ========================================================================== */
section#resume{
    clear: both;
}
section#resume ul{
    margin:0px;
    padding: 0px;
    text-align: left;
}
section#resume li{
    list-style-type: none;
    display: inline-block;
    margin-right: -4px;
}
section#resume .items li:after{
    list-style-type: none;
    display: inline-block;
    content: '｜';
}
section#resume .items li:last-child:after{
    content: '';
}
section#resume .exp-detail {
    margin-left: 1.3em;
}
section#resume .exp-detail > li {
    list-style-type: disc;
    display: list-item;
}
section#resume ol > li {
    list-style-type: decimal;
    display: list-item;
}
section#resume .job-detail {
    font-size: 0.9em;
    margin: 4px 0 10px 0;
}
#skill{
    font-size: 0.9em;
}
.skill-num{
    margin: 0 0 10px 10px;
    font-size: 1.2em;
}
li.skill-bar{
    position: relative;
    background-color: #ccc;
    height: 30px;
    width: 100%;
}
#toeic-bg{
    width: 85%;
}
#jlpt-bg{
    width: 85%;
}
li.skill-bar .bar-expand{
    position: absolute;
    background-color: #333;
    height: 30px;
    margin-top: 0px;
}
.ani-toeic{
    width: 77%;
    -webkit-animation-name: skill-toeic; /* Chrome, Safari, Opera */
    -webkit-animation-duration: 2s; /* Chrome, Safari, Opera */
    animation-name: skill-toeic;
    animation-duration: 2s;
}
.ani-jlpt{
    width: 50%;
    -webkit-animation-name: skill-jlpt; /* Chrome, Safari, Opera */
    -webkit-animation-duration: 2s; /* Chrome, Safari, Opera */
    animation-name: skill-jlpt;
    animation-duration: 2s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes skill-toeic {
    from {width: 0%;}
    to {width: 77%;}
}
@keyframes skill-toeic {
    from {width: 0%;}
    to {width: 77%;}
}
@-webkit-keyframes skill-jlpt {
    from {width: 0%;}
    to {width: 50%;}
}
@keyframes skill-jlpt {
    from {width: 0%;}
    to {width: 50%;}
}
/* ==========================================================================
   section#portfolio
   ========================================================================== */
section.portfolio .detail:after{
    content: " ";
    display: block; 
    height: 0; 
    clear: both;
}
section.portfolio .title{
    text-align: center;
    margin-bottom: 40px;
}
.portfolio-icon{
    float: left;
    width: 25%;
    margin-bottom: 40px;
}
.portfolio-padding:hover .overlay,
.portfolio-padding:focus .overlay{
    opacity: 0.75;
    transition: opacity 0.3s ease-in-out 0s;
}
.portfolio-icon img{
    width: 100%;
}
.portfolio-no-icon {
    padding-top: 100%;
    background: url('../img/paper.jpg');
}
.portfolio-no-icon > p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    margin: 0;
    text-align: center;
    color: #333;
    font-size: 1.2em;
    line-height: 2;
    width: 100%;
}
.portfolio-padding{
    width: 90%;
    margin: 0 auto;
    position: relative;
}
.overlay{
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color:#000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0s;
}
.overlay-content{
    margin:20px;
    color:#fff;
    line-height: 1.2em;
}
.overlay-content p{
    font-size: 0.8em;
    color: #eee;
    margin-top: 10px;
}
.white-popup {
  position: relative;
  background: #FFF;
  padding-top: 40px;
  width: auto;
  max-width: 700px;
  margin: 20px auto;
}
.white-popup img{
    width: 100%;
}
.white-popup > img{
    box-shadow: 0px 1px 5px 0px #4A4A4A;
}
.popup-content{
    padding: 20px 25px 10px 25px;
}
.slider > .popup-content{
    padding-top: 0px;
}
.tags{
    font-size: 0.8em;
}

    
/* ==========================================================================
   footer
   ========================================================================== */
footer{
    clear: both;
    padding:20px 0px 20px 0px;
    background-color: #000;
    color: #ccc;
    text-align: center;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers:
 */

.hidden {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}
@media only screen and (min-width: 768px) and (max-width: 850px) {
    .portfolio-icon{
        float: left;
        width: 33.33333%;
    }
}
@media only screen and (max-width: 768px) {
    /* Style adjustments for viewports that meet the condition */
    html{
        font-size: 0.8em;
    }
    header#top {
        background-attachment: initial;
    }
    .textarea{
        padding: 40px 0;
    }
    .detail-left{
        float: none;
        margin:0px 0px 40px 0px;
    }
    .detail-right{
        margin:0px 0px 0px 0px;
        position: relative;
    }
    h2{
        font-size: 1.2em;

    }
    .portfolio-icon{
        clear: both;
        width: 100%;
        margin-bottom: 40px;
    }
    .portfolio-padding{
        position: relative;
        width: 70%;
        max-width: 300px;
        margin: 0px auto;
    }
    div#profile-pic{
        width: 120px;
        height: 120px;
    }
    .about-detail {
        clear: both;
        width: 100%;
    }
    .about-detail:first-child {
        margin-bottom: 20px;
    }
}

@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   http://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster:
                                   http://www.sanbeiji.com/archives/953 */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}

