/* Preliminary palette */
/*
    purple: #b58bba
    light purple: #e9e1ea
    coral: #f15946
    orange: #f4a22e
    dark blue: #141b41
    yellow: #f9c22e
    teal: #3cbbb1
    dark grey: #333
*/

/* Variables */
:root {
    --body-font:    'PT Sans', Arial, Helvetica, sans-serif;
    --title-font:   'Comfortaa', Arial, Helvetica, sans-serif;

    --border-radius-large: 28px;

    --brown-dark:       #663715;
    --coral:            #f15946;

    --purple:           #b58bba;
    --purple-light:     #e9e1ea;
    --purple-light-bg:  #f6f1f7;

    --teal:             #3cbbb1;
    --teal-dark:        #339d94;

    --yellow:           #f9c22e;
    --yellow-light:     #fdf3db;
    --yellow-light-bg:  #fcfaf2;
  }
  

/* Global */
body {
    background-color: var(--purple-light-bg);
    color: var(--brown-dark);
    font-family: var(--body-font);
    font-size: 1rem;
    font-weight: normal;
    margin: 0;
    padding: 0;
}
body > div {
    background-color: var(--yellow-light-bg);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

h1 {
    color: var(--purple);
    font-family: var(--title-font);
    font-size: 5.75rem;
    line-height: 1.2em;
    margin: 0 0 -20px 0;
    display: block;
    position: relative;
    text-shadow: 2px 0 var(--yellow-light-bg), -2px 0 var(--yellow-light-bg), 0 2px var(--yellow-light-bg), 0 -2px var(--yellow-light-bg), 1px 1px var(--yellow-light-bg), -1px -1px var(--yellow-light-bg), 1px -1px var(--yellow-light-bg), -1px 1px var(--yellow-light-bg);
    z-index: 1;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: normal;
}
h1 > span {
    display: block;
    position: relative;
    animation: 0.33s fade-in forwards cubic-bezier(0.11, 0, 0.5, 0);
    opacity: 0;
}

h2, .h2	{
    font-family: var(--body-font);
    font-weight: normal;
    font-size: 2rem;
    margin: 10px 0 20px;
}

h3, .h3	{
    font-family: var(--title-font);
    font-weight: normal;
    font-size: 1.6rem;
    margin: 10px 0 20px;
}

p	{
    font-family: var(--body-font);
    line-height: 1.5;
    font-size: 1.15rem;
    margin: 20px;
}
a { color: var(--coral); }
a:hover	{ color: var(--teal-dark); text-decoration: none; }
hr {
    border: 1px solid var(--purple-light);
    margin: 20px auto;
    position: relative;
    max-width: 1200px;
    width: 100%;
}
img { width: 100%; }

.content-wrapper {
    max-width: 976px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}
.content-wrapper > h2 { text-align: center; }

div > section:first-child { padding: 10px 20px 0; }
div > section:last-child { padding: 0 20px 10px; }

/* Helper Classes */
.center { text-align: center; }
.cursive { font-family: var(--title-font); line-height: 1.6; }
.flex { display: flex; align-items: center; }
.flex h2 { margin: 0; }
.sr-only { text-indent: -9999px; display: inline-block; } /* For screen-reader-only content */
.no-bullets { list-style: none; padding-left: 0; }

.pull-quote {
    border-left: 4px solid var(--purple-light);
    font-style: italic;
    padding-left: 20px;
}

.closeBtn {
    position: relative;
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.15s ease-out;
  }
  .closeBtn:hover {
    opacity: 1;
    transition: opacity 0.20s ease-in;
  }
  .closeBtn:before, .closeBtn:after {
    position: absolute;
    left: 10px;
    content: ' ';
    height: 21px;
    width: 2px;
    background-color: var(--purple);
  }
  .closeBtn::before {
    transform: rotate(45deg);
  }
  .closeBtn::after {
    transform: rotate(-45deg);
  }

/* --------------------------------------------------------- */

/* Element-specific */
/* Intro */
h1::after {
    color: var(--coral);
    content: "Hello!";
    display: block;
    position: absolute;
    z-index: -1;
    top: 8px;
    left: 10px;

    animation: 0.4s fade-in 0.2s forwards cubic-bezier(0.11, 0, 0.5, 0);
    opacity: 0;
    filter: blur(4px);
}
h1 > span::after {
    color: var(--purple-light);
    content: "Hello!";
    display: block;
    position: absolute;
    z-index: -1;
    top: 4px;
    left: 5px;
    text-shadow: 2px 0 var(--yellow), -2px 0 var(--yellow), 0 2px var(--yellow), 0 -2px var(--yellow), 1px 1px var(--yellow), -1px -1px var(--yellow), 1px -1px var(--yellow), -1px 1px var(--yellow);
}
header {
    background-color: var(--purple-light-bg);
    padding: 14px 0 26px;
    margin-bottom: 20px;
    position: relative;
    border-bottom: 2px dotted var(--purple);
    box-shadow: 0 -2px 5px 1px var(--purple);
}
header::after {
    display: block;
    position: absolute;
    font-size: 1.6rem;
    color: var(--purple);
    opacity: 0.75;
    z-index: -1;
    top: 86%;
    left: -32px;
    max-width: 105%;
    /* The content fill below creates the "lace edging" effect on the site header */
    content: "\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9\25C9";
}
header .content-wrapper { align-items: last baseline; justify-content: space-between; max-width: 888px; }

#bio { padding: 10px 0; }
#bio .content-wrapper > div > p { margin: 20px 0 20px 10%; text-align: justify; }
.bio-img {
    border: 10px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--purple-light);
    display: block;
    height: 210px;
    width: 210px;
}
#bio .contact { justify-content: space-evenly; max-width: 60%; margin: 24px auto 0; }
#bio .contact img { min-width: 24px; filter: invert(67%) sepia(34%) saturate(330%) hue-rotate(247deg) brightness(85%) contrast(90%); transition: all 0.25s ease-in; }
#bio .contact img:hover { min-width: 24px; filter: invert(48%) sepia(64%) saturate(1145%) hue-rotate(327deg) brightness(90%) contrast(110%); }

/* Gallery */
#projects {
    background-color: var(--yellow-light);
    border-bottom: 2px solid var(--purple-light);
    border-top: 2px solid var(--purple-light);
    margin: 30px 0 40px;
    padding: 10px 0;
    position: relative;
}
#projects .content-wrapper { max-width: 1200px; }
#projects #closeProject { display: none; }
#projects h2 { margin-bottom: 0; }
#project-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 36px;
    padding: 0;
    flex-wrap: nowrap;
}
#project-list li { max-width: 22%; width: 25%; }

#project-list li a { text-decoration: none; }
#project-list li a img {
    border: 4px solid transparent;
    border-radius: var(--border-radius-large);
    transition: all 0.25s ease-in;
}
#project-list li a p {
    font-family: var(--title-font);
    letter-spacing: -0.05rem;
    line-height: 1.3;
    margin: 0;
    padding: 20px 0;
    text-align: center;
}
#project-list li a:hover img { border: 4px solid var(--teal); }

#project-list li .project-list__description { display: none; }
#project-list li .project-list__description h3 { padding-right: 20px; }
#project-list li .project-list__description p { margin: 20px 0; }

#projects:not(.expanded) #project-list { padding: 10px 3% 0; }

#project-list li:not(.isOpen) .f-thumbs__slide,
#project-list li:not(.isOpen) .f-carousel { display: none; }

#projects noscript p { width: 100%; text-align: center; }

/* Gallery with open item */
#projects.expanded #closeProject {
    display: block;
    position: absolute;
    right: 40px;
    top: 94px;
    z-index: 1;
}
.expanded #project-list { flex-wrap: wrap; }
.expanded #project-list li.isOpen {
    display: flex;
    max-width: 100%;
    width: 100%;
}
.expanded #project-list li.isOpen > div { max-width: 550px; position: relative; }
/* .expanded #project-list li.isOpen a img { animation: 0.5s enlargeThumbnail forwards; } */
.expanded #project-list li.isOpen:not(.no-carousel) .project-list__thumbnail { display: none; }
.expanded #project-list li.isOpen > div > a > img,
.expanded #project-list li.isOpen > div > .f-carousel { margin-top: 20px; }
.expanded #project-list li.isOpen a p { display: none; }
.expanded #project-list li.isOpen .project-list__description {
    display: block;
    max-width: 55%;
    opacity: 0;
    margin-left: 42px;
    transition: opacity 1s ease;
    padding-top: 20px;
}
.expanded #project-list li.isOpen .project-list__description > div {
    background-color: var(--yellow-light-bg);
    border: 2px solid var(--purple-light);
    border-radius: var(--border-radius-large);
    padding: 10px 40px 20px;
}
.expanded #project-list li.isOpen:not(.fadeOut) .project-list__description {
    animation: 0.3s fade-in 0.1s forwards ease-in;
}
.expanded #project-list li.isOpen.fadeOut .project-list__description {
    animation: 0.2s fade-out 0s forwards ease-out;
    opacity: 1;
}

/* Projects gallery image carousel rules & overrides */
.f-carousel {
    --f-carousel-theme-color: var(--purple);
    --f-button-bg: var(--yellow-light-bg);
    --f-button-hover-bg: var(--yellow-light-bg);
    --f-button-active-bg: var(--yellow-light-bg);
}
.f-carousel__thumbs {
    --f-thumb-width: 75px;
    --f-thumb-height: 75px;
}
.f-carousel__slide {
    height: auto;
    overflow: visible;
}
.f-carousel__slide > img {
    border-radius: var(--border-radius-large);
}
.f-carousel__slide.has-caption > img {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.f-carousel__slide > .caption {
    font-size: 0.9em;
    margin: -14px 0 0;
    padding: 20px;
    border-bottom-left-radius: var(--border-radius-large);
    border-bottom-right-radius: var(--border-radius-large);
    background-color: #333;
    color: var(--yellow-light);
    filter: brightness(85%);
    text-align: center;
}
.f-carousel__nav {
    position: absolute;
    width: 116%;
    transform: translate(0%, 100%);
    left: -8%;
    top: 50%;
}
.f-carousel__nav > .f-button {
    border-radius: 50%;
    opacity: 0.75;
    border: 1px solid transparent;
}
.f-carousel__nav > .f-button:hover {
    opacity: 1;
    border: 1px solid var(--purple-light);
}


/* Career */
#career ul, #noncareer ul {
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
footer {
    background-color: var(--purple-light-bg);
    border-top: 2px dotted var(--purple);
    margin-top: 40px;
}
footer p { margin: 0; padding: 20px 0 30px; font-size: 1rem; }

/* --------------------------------------------------------- */

/* Animation */
@keyframes enlargeThumbnail {
    100% {
        transform: scale(1.2);
    }
}
@keyframes fade-in {
    100% {
        opacity: 1;
        filter: blur(0);
    }
}
@keyframes fade-out {
    100% {
        opacity: 0;
        filter: blur(0);
    }
}
@keyframes scale {
    100% {
        transform: scale(1);
    }
}
@keyframes tilt {
    30% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(-5deg);
    }
    70% {
        transform: rotate(-3.5deg);
    }
    100% {
        transform: rotate(-4deg);
    }
}

/* --------------------------------------------------------- */

/* Media Queries */
@media (max-width: 1300px) {
    header .content-wrapper { max-width: 850px; }

    #bio { padding: 10px 4%; }

    .f-carousel__nav { display: none; }
}

@media (max-width: 940px) {
    .desktop-only { display: none; }

    h1 { font-size: 5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    header .flex { flex-direction: column; align-items: center; }
    header h2 { padding-top: 26px; }
    header::after { top: 89%; }

    #bio .flex:not(.contact) { flex-direction: column; }
    #bio .content-wrapper > div > p { margin: 20px 10px; max-width: 600px; }

    #projects { border-top: 2px solid var(--purple-light); margin: 30px 0 0; }
    #projects .content-wrapper { border-radius: none; padding: 0; }
    #project-list { gap: 4%; }
    #project-list li a p { font-size: 1rem; }

    .expanded #project-list li.isOpen {
        flex-wrap: wrap;
        flex-direction: column-reverse;
        padding-bottom: 20px;
        background-color: var(--yellow-light-bg);
        margin-bottom: 26px;
    }
    .expanded #project-list li.isOpen > div:first-child { margin: 0 auto; }
    .expanded #project-list li.isOpen a img { margin-top: 0; }
    .expanded #project-list li.isOpen .project-list__description { margin-left: 0; max-width: 100%; padding-top: 0; }
    .expanded #project-list li.isOpen .project-list__description > div {
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    .expanded #project-list li.isOpen .project-list__description h3 { padding-right: 0; }
    .expanded #project-list li.isOpen .project-list__description > div h3,
    .expanded #project-list li.isOpen .project-list__description > div p {
        max-width: 600px;
        margin: 20px auto;
    }

    .f-carousel {
        max-width: 90%;
        margin: 0 auto;
    }
    .f-carousel__nav { display: block; }

    #career, #noncareer { padding-top: 20px; }
    #career ul, #noncareer ul { max-width: 600px; }
}

@media (max-width: 825px) {
    .desktop-only { display: block; }

    header::after { top: 91%; }

    #project-list { flex-wrap: wrap; }
    #project-list li { max-width: 40%; width: 40%; }

    #projects.expanded #closeProject {
        right: 2%;
        top: 82px;
    }

    .expanded #project-list li.isOpen > div:first-child > a {
        max-width: 90%;
        display: block;
        margin: 0 auto;
    }
    .expanded #project-list li.isOpen .project-list__description > div { padding: 10px 9% 20px; }
}
  
