/* ===========================================================================
   Additions on top of Casper/Jasper (screen.css).
   Casper sets html{font-size:62.5%}, so 1rem = 10px throughout.
   Palette borrowed from Casper: #3A4145 body, #2E2E2E headings, #5ba4e5 link.
   =========================================================================== */

/* --- Wordmark in place of Casper's image logo --------------------------- */
.blog-logo-text {
    font-family: "Open Sans", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02rem;
    line-height: 38px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.no-cover .blog-logo-text {
    color: rgba(0, 0, 0, 0.75);
    text-shadow: none;
}

/* --- Subtitles and section intros --------------------------------------- */
.post-subtitle {
    margin: 1.6rem 0 0 0;
    font-family: "Merriweather", serif;
    font-size: 2rem;
    line-height: 1.5em;
    font-style: italic;
    color: #7d8993;
}

.section-title {
    max-width: 710px;
    margin: 0 auto 3rem auto;
    padding-top: 1rem;
    font-family: "Open Sans", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: #9EABB3;
    border-bottom: 1px solid #EBF2F6;
    padding-bottom: 1rem;
}

.section-lead {
    max-width: 710px;
    margin: 0 auto 4rem auto;
    font-size: 2.1rem;
    line-height: 1.7em;
    color: #3A4145;
}

.section-more {
    max-width: 710px;
    margin: 0 auto 6rem auto;
    font-family: "Open Sans", sans-serif;
    font-size: 1.5rem;
}

/* --- Card grid for the Research / Projects / Fun indexes ---------------- */
.card-grid {
    max-width: 1100px;
    margin: 0 auto 6rem auto;
    padding: 0 4vw;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3.2rem;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #EBF2F6;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.card-image {
    display: block;
    height: 190px;
    background: #d8dee2 no-repeat center center;
    background-size: cover;
}

.card-body {
    padding: 2.4rem 2.4rem 2.8rem 2.4rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-meta {
    margin: 0 0 1rem 0;
    font-family: "Open Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: #9EABB3;
}

.card-title {
    margin: 0 0 1.2rem 0;
    font-size: 2.2rem;
    line-height: 1.25em;
    letter-spacing: -0.3px;
}

.card-title a { text-decoration: none; color: #2E2E2E; }
.card-title a:hover { color: #5ba4e5; }

.card-excerpt {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.65em;
    color: #5b6b73;
}

.card-body .tag-row { margin-top: auto; padding-top: 1.6rem; }

/* --- Facts strip on an entry page --------------------------------------- */
.entry-facts {
    max-width: 710px;
    margin: 0 auto 4rem auto;
    padding: 2.4rem 0;
    border-top: 1px solid #EBF2F6;
    border-bottom: 1px solid #EBF2F6;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.4rem;
}

.entry-facts .fact h5 {
    margin: 0 0 0.6rem 0;
    font-family: "Open Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: #9EABB3;
}

.entry-facts .fact p {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.6em;
}

.entry-kind {
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    font-size: 1.2rem;
}

/* --- Tag pills ----------------------------------------------------------- */
.tag {
    display: inline-block;
    margin: 0 0.4rem 0.6rem 0;
    padding: 0.3rem 0.9rem;
    border: 1px solid #dfe6ea;
    border-radius: 3px;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    line-height: 1.5em;
    color: #7d8993;
    background: #F7FAFB;
}

/* --- Figures, galleries, video ------------------------------------------ */
.post-content figure { margin: 3.2rem 0; }

.post-content figure img,
.post-content .figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.post-content figcaption {
    margin-top: 1.2rem;
    font-family: "Open Sans", sans-serif;
    font-size: 1.35rem;
    line-height: 1.5em;
    color: #9EABB3;
    text-align: center;
}

/* Break a figure out past the 710px text column. */
.figure-wide {
    width: 100vw;
    max-width: 1100px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.6rem;
    margin: 3.2rem 0;
    padding: 0;
    list-style: none;
}

.gallery li { margin: 0; }

.gallery img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 3px;
}

.gallery figcaption { text-align: left; font-size: 1.25rem; }

.post-content video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
    background: #000;
}

/* --- A quiet definition list, used on About ----------------------------- */
.facts-list {
    margin: 0 0 3rem 0;
    padding: 0;
    list-style: none;
}

.facts-list li {
    display: flex;
    gap: 1.6rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid #EBF2F6;
    font-size: 1.6rem;
    line-height: 1.5em;
}

.facts-list .k {
    flex: 0 0 34%;
    font-family: "Open Sans", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: #9EABB3;
    padding-top: 0.3rem;
}

.facts-list .v { flex: 1 1 auto; }

/* Casper only constrains width on `.post`. A `.post-content` used directly
   inside `main.content` (e.g. the Presentations list) needs the same measure. */
.content > .post-content {
    width: 80%;
    max-width: 710px;
    margin: 0 auto 6rem auto;
}

/* --- Post list on the blog index ---------------------------------------- */
.post-list { margin: 0; padding: 0; list-style: none; }

/* --- Contact links ------------------------------------------------------- */
.contact-links {
    margin: 0 0 3rem 0;
    padding: 0;
    list-style: none;
}

.contact-links li {
    padding: 1.6rem 0;
    border-bottom: 1px solid #EBF2F6;
    font-size: 1.8rem;
}

.contact-links .k {
    display: block;
    font-family: "Open Sans", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: #9EABB3;
    margin-bottom: 0.4rem;
}

/* --- Small screens ------------------------------------------------------- */
@media only screen and (max-width: 500px) {
    .card-grid { padding: 0 5vw; gap: 2.4rem; }
    .blog-logo-text { font-size: 1.3rem; }
    .facts-list li { flex-direction: column; gap: 0.4rem; }
    .facts-list .k { flex: none; }
    .post-subtitle { font-size: 1.7rem; }
    .figure-wide { width: auto; left: auto; transform: none; }
}
