/* CSS Variables for Colors */
:root {
    --primary-color: #333;
    --secondary-color: #555;
    --background-color: #f5f5f5;
    --link-color: rgb(100, 100, 100);
    --link-hover: #5c7e7c;
    --text-color: #646464;
    --link-underline: rgba(160, 160, 160, 0.65);
    --nav-background-color: #fafafa;
    --border-color: #f0f0f0;
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

ol, ul {
    margin-left: 1.5em;
}

.meta a {
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
    border-bottom: dotted 1px var(--link-underline);
}

a:hover {
    border-bottom-color: transparent;
    color: --link-color !important;
    color: var(--link-hover);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 0;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.nav-bar .site-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.search input {
    padding: 5px;
    font-size: 1rem;
}

.icons a {
    margin: 0 5px;
}

.masthead {
    text-align: center;
    padding: 20px 0;
}

.masthead h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.masthead h2 {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Styling for the first post on the home page */
body.home .posts-grid .post:first-child {
    grid-column: span 2;
}

body.home .posts-grid .post:first-child img {
    width: 100%;
    height: auto;
}

/* General post styling */
.post {
    background: white;
    margin: 0;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    grid-column: span 2;
}

.post img {
    width: 100%;
    height: auto;
}

.post h3 {
    margin-top: 10px;
    text-wrap: pretty;
}

.date, .tags {
    font-size: 0.7em;
    font-weight: 400;
    letter-spacing: 0.25em;
    line-height: 1.5;
    margin-top: -1em;
    text-transform: uppercase;
    text-wrap: pretty;
    text-indent: -2em;
    margin-left: 2em;
    margin-bottom: 1em;
}

.more-posts {
    text-align: center;
    margin: 20px 0;
}

.colophon {
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 20px;
}

.posts-grid {
    display: grid;
    gap: 20px;
}
.posts-grid:first-child {
    margin-top: 1em;
}

@media (min-width: 768px) {
    .post {
        grid-column: span 1;
    }
    .container {
        padding: 0 30px;
    }
    body .nav-bar nav {
        display: flex;
    }
    nav .search {
        display: block;
    }
    nav .icons {
        display: block;
    }
}

@media (min-width: 990px) {
    .post {
        flex-direction: row;
    }

    .post header h3 {
        margin-top: 0;
    }

    .hero {
        flex: 0 0 33.3333%; /* 1/3 width */
        margin-bottom: 0;
        margin-right: 20px;
    }

    .header, .main {
        flex: 1 1 66.6667%; /* 2/3 width */
    }
}

/* Do fancy hero hover thing */

.hero {
    position: relative;
    overflow: hidden;
    display: block;
    white-space: collapse nowrap;
}

.hero img {
    transition: transform 0.3s ease;
}

.hero img:hover {
    transform: scale(1.1);
}

/* Typography? */

@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

body {
    color: var(--text-color);
    font-family: "Source Sans 3", Helvetica, sans-serif;
    font-size: 14pt;
    font-weight: 400;
    line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
    color: #3c3b3b;
    font-family: "Raleway", Helvetica, sans-serif;
    font-weight: 800;
    letter-spacing: 0.25em;
    line-height: 1.65;
    margin: 0 0 1em 0;
    text-transform: uppercase;
}

.post main p {
    margin: 1em 0;
}

.post main {
    margin-top: 1em;
}

.post main p:first-child {
    margin: 0;
}

.post main:first-child {
    margin-top: 0;
}

/* Navigation Bar Styling */
.nav-bar {
    background-color: var(--nav-background-color);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-bar nav {
    display: block;
    width: 100%;
    margin: 0 30px;
    justify-content: space-between;
    align-items: center;
}

.nav-bar .site-title {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.nav-bar .site-title a {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.nav-bar .site-title i {
    margin-right: 8px;
}

.search {
    margin-left: auto;
    position: relative;
    display: none;
}

.search input {
    padding: 5px 10px 5px 30px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.icons a {
    margin: 0 5px;
    color: var(--primary-color);
}

/* pagination */

.pagination {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.pagination ul {
    list-style-type: none;
    display: flex;
    gap: 0.5rem;
}

.page-item {
    display: inline;
}
.page-item.active {
    outline: 1px solid #999;
    outline-offset: -0.25em;
}

.page-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    color: var(--primary-color);
    transition: background-color 0.3s, color 0.3s;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--link-color);
}

.floatright, .right {
    float: right;
    margin-left: 1em !important;
}
.floatleft, .left {
    float: left;
    margin-right: 1em !important;
}
.small {
    max-width: 30%;
}


.photo-stack li img {
    border: 3px solid #fff;
}