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

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter.ttf') format('truetype');
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/InstrumentSerif-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/InstrumentSerif-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Iowan';
    src: url('../fonts/Iowan-regular.otf') format('opentype');
}


:root {
    --background: #ffffff;
    --background-image: #f9f9f9;
    --text: #111111;
    --text-high-mid: #333333;
    --text-mid: #555555;
    --text-mid-low: #666666;
    --text-low: #777777;
    --text-low-light: #909090;
    --line: #d0d0d0;
    --line-light: #e8e8e8;
    --f-size: 1rem;
    --f-weight: 400;
    --f-weight-semi-bold: 500;
    --scale-s: 0.8;
    --scale-sm: 0.94;
    --scale-m: 0.96;
    --scale-ml: 1.0;
    --scale-l: 1.2;
    --scale-xl: 1.325;
    --scale-2xl: 1.5;
    --scale-3xl: 2.5;
    --scale-4xl: 3;
    --scale-5xl: 3.5;
    --max-width: 580px;
    --line-height-th-content: 1.8;
    --photo-height: 100vh;
    --radius-sm: 2px;
    --radius-md: 4px;
}

/* 
Screen  Old     New

250     560     580
500     590     620
1000    610     640
1500    640     670
2000    710     740
2250    760     790

250     1.06    1.1
500     1.075   1.12
1000    1.115   1.16
1500    1.15    1.2
2000    1.25    1.3
2250    1.35    1.4
 */

@media (min-width: 250px) {
    :root {
        --f-size: 1.1rem;
        --max-width: 560px;
    }
}

@media (min-width: 500px) {
    :root {
        --f-size: 1.12rem;
        --max-width: 620px;
    }
}

@media (min-width: 1000px) {
    :root {
        --f-size: 1.18rem;
        --max-width: 640px;
    }
}

@media (min-width: 1500px) {
    :root {
        --f-size: 1.2rem; 
        --max-width: 670px;
    }
}

@media (min-width: 2000px) {
    :root {
        --f-size: 1.3rem;
        --max-width: 740px;
    }
}

@media (min-width: 2250px) {
    :root {
        --f-size: 1.4rem;
        --max-width: 790px;
    }
}

/* Thoughts index — custom --f-size scale */
@media (min-width: 1000px) {
    body.page-thoughts {
        --f-size: 1.2rem;
    }
}

@media (min-width: 1500px) {
    body.page-thoughts {
        --f-size: 1.275rem;
    }
}

@media (min-width: 2000px) {
    body.page-thoughts {
        --f-size: 1.35rem;
    }
}

@media (min-width: 2250px) {
    body.page-thoughts {
        --f-size: 1.425rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #111;
        --background-image: #151515;
        --text: #C7C8CA;
        --text-high-mid: #b8b9bb;
        --text-mid-low: #a2a2a2;
        --text-mid: #a4a6a8;
        --text-low: #737476;
        --text-low-light: #4d4d4d;
        --line: #454545;
        --line-light: #2a2a2a;
    }
}

::selection {
    background: var(--text);
    color: var(--background);
}

/* Hide scrollbar for all browsers */
html {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

html::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

body {
    line-height: 1.8;
    display: flex;
    justify-content: center;
    font-family: "Inter", "Iowan Old Style", "Iowan", "Charter", "Palatino Linotype", "Palatino", "Book Antiqua", "Palatino LT STD", Times New Roman, serif;
    font-size: var(--f-size);
    font-weight: var(--f-weight);
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-kerning: normal;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

strong {
    font-weight: var(--f-weight-semi-bold);
}

/* Iowan for thoughts (listing + individual posts) */
body.page-thoughts,
body.page-post {
    font-family: 'Iowan', 'Iowan Old Style', 'Charter', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
}

p {
    margin: 0;
    padding: 0;
}

.wrap {
    position: relative;
    width: 90%;
    max-width: var(--max-width);
    margin: 5vw;
}

/* LINKS  */

a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

a:hover {
    border-bottom: 1px solid var(--text);
}

.a-undecorated {
    color: var(--text-low);
    text-decoration: none !important;
    border-bottom: none;
}

.a-undecorated:hover {
    color: var(--text);
    border-bottom: none;
}

.a-disabled {
    pointer-events: none;
}

/* SECTION */

.section {
    padding-top: 10%;
    padding-bottom: 1.5%;
    font-size: calc(var(--f-size) * var(--scale-s));
    color: var(--text-low);
}

.subsection {
    padding-top: 0;
    padding-bottom: 2rem;
    font-size: calc(var(--f-size) * var(--scale-sm));
    color: var(--text-mid-low);
}

.section-right {
    padding-top: 10%;
    padding-bottom: 1.5%;
    font-size: calc(var(--f-size) * var(--scale-s));
    color: var(--text-low);
    text-align: right;
}


ul {
    list-style-type: circle;
}

/* UNIQUE */

.home-now {
    display: block;
}

@media (min-width: 1000px) {
    .home-now {
        display: inline;
    }
}

.home-icon-circle {
    /* Or #FF2E00 - more dark */
    background-color: #FF2E00;
    width: 20px;
    height: 9px;
    border-radius: 4px;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 1000px) {
    .home-icon-circle {
        margin-top: 1rem;
        margin-bottom: 3.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    .home-icon-circle {
        background-color: #d82800;
    }
}

.svg {
    width: 0.75rem;
    height: 0.75rem;
    display: inline;
    margin-top: 2rem;
}

/* ALL THOUGHTS */

.thought {
    display: flex;
    color: var(--text);
}

.thought:hover .post-spacer {
    border-bottom: 1px solid var(--text);
}

.post-spacer {
    margin-right: .5rem;
    margin-left: .5rem;
    height: 1px;
    border: none;
    border-bottom: 1px dotted var(--text-mid);
    flex: 1 0 1rem;
    opacity: 0.25;
    align-self: flex-end;
    margin-bottom: 0.55rem;
}


/* INDIVIDUAL THOUGHTS */
h1,
h2, 
h3 {
    font-weight: normal;
}

.post-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    margin-top: 3rem;
}

@media (min-width: 700px) {
    .post-header{
        margin-top: 2rem;
    }
}

.th-heading {
    font-size: calc(var(--f-size) * 1.4);
    padding-top: 4%;
    padding-bottom: 0.5rem;
    color: var(--text);
}

.th-sub-title {
    font-size: calc(var(--f-size) * var(--scale-sm));
    color: var(--text-low);
    margin-top: -28px;
}

.th-content {
    font-size: var(--f-size);
    padding-top: 2%;
    line-height: var(--line-height-th-content);
    letter-spacing: 0.0125em;
    color: var(--text-high-mid);
}

.th-content table {
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: calc(var(--f-size) * var(--scale-sm));
    line-height: 1.5;
}

@media (max-width: 999px) {
    .th-content table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        margin: 2rem 0;
    }
}

.th-content th,
.th-content td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--line);
    white-space: nowrap;
}

.th-content thead th {
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

.th-content tbody td:nth-child(4) {
    text-align: center;
}

.th-content table.center-data tbody td:not(:first-child) {
    text-align: center;
}

/* Section separator */
.separator {
    border: none;
    border-top: 1px solid var(--line-light);
    width: 35%;
    margin: 3.5rem auto;
    height: 0;
}

.th-image {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    background-color: var(--background-image);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-sizing: border-box;
}

@media (min-width: 700px) {
    .th-image {
        padding: 3rem;
    }
}

@media (min-width: 1200px) {
    .th-image {
        padding: 4rem;
    }
}

.th-image img {
    max-width: 100%;
    max-height: 45vh;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.th-image figcaption {
    max-width: calc(var(--max-width) * 0.85);
    padding-top: 15px;
    text-align: center;
    color: var(--text-low);
    font-style: italic;
    font-size: calc(var(--f-size) * var(--scale-s));
    display: block;
    grid-template-columns: unset;
}

@media (min-width: 700px) {
    .th-image {
        width: calc(100% + 20%);
        margin-left: -10%;
        margin-right: -10%;
        margin-top: 3.5rem;
        margin-bottom: 3rem;
    }
    
    .th-image img {
        max-height: 50vh;
    }
}

@media (min-width: 1200px) {
    .th-image {
        width: calc(100% + 40%);
        margin-left: -20%;
        margin-right: -20%;
        margin-top: 4.5rem;
        margin-bottom: 4rem;
    }
    
    .th-image img {
        max-height: 55vh;
    }
}

.wrap-thought p + p {
    padding-top: 25px;
    /* text-indent: 1.5em; */
}



/* FOOTER */

.thoughts-footer {
    display: flex;
    padding-top: 5%;
    padding-bottom: 10%;
    color: var(--text-low);
}

.p-footer {
    font-size: calc(var(--f-size) * var(--scale-s));
    color: var(--text-low);
}

.p-footer:hover {
    color: var(--text);
}


/* BLOCK QUOTES */


/* blockquote + p {
    text-indent: 1.5em;
} */

blockquote {
    margin-left: 0;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-left: 1.5px solid var(--text-mid);
}

blockquote p {
    font-size: calc(var(--f-size) * var(--scale-m));
    margin-left: 1rem;
}


/* PHOTOS */
.grid-container {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

figure {
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
}

.img-wrap {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    width: 100vw;
    position: relative;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 30px;
}

.img-caption-container {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
}

.img-wrap-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.img-wrap h1 {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: calc(var(--f-size) * 2.75);
    margin: 0;
    margin-top: -2rem;
    margin-bottom: 1rem;
    max-width: 90vw;
    text-align: center;
    padding: 0 5vw;
}

.img-wrap h3 {
    font-family: 'Instrument Serif', serif;
    line-height: 1.4;
    font-style: normal;
    font-size: calc(var(--f-size) * 1.3);
    color: var(--text-mid);
    margin: 0;
    margin-bottom: 1rem;
    max-width: 90vw;
    text-align: center;
    padding: 0 5vw;
}

.img-wrap h4 {
    font-family: 'Instrument Serif', serif;
    display: none;
    line-height: 1.4;
    font-style: normal;
    font-size: calc(var(--f-size) * 0.8);
    color: var(--text-low-light);
    margin: 0;
    max-width: 90vw;
    text-align: center;
    padding: 0 5vw;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.img-wrap h4.mobile-only {
    font-weight: normal;
    display: block;
}

.img-wrap h4.desktop-only {
    display: none;
}

.img-wrap img {
    max-width: 90vw;
    max-height: 50vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

figcaption {
    font-family: 'Instrument Serif', serif;
    width: 100%;
    color: var(--text-low-light);
    font-size: calc(var(--f-size) * var(--scale-sm));
    padding: 15px 0 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
}

figcaption .caption-number {
    text-align: left;
    justify-self: start;
}

figcaption .caption-title {
    text-align: center;
    justify-self: center;
}

figcaption .caption-date {
    text-align: right;
    justify-self: end;
}

@media (min-width: 700px) {
    .img-wrap img {
        max-width: 85vw;
        max-height: 70vh;
    }
}

@media (min-width: 1200px) {
    .img-wrap h1 {
        font-size: calc(var(--f-size) * var(--scale-5xl));
    }

    .img-wrap h3 {
        font-size: calc(var(--f-size) * var(--scale-2xl));
    }

    .img-wrap h4.mobile-only {
        display: none;
    }
    
    .img-wrap h4.desktop-only {
        display: block;
        font-weight: normal;
        font-size: calc(var(--f-size) * var(--scale-sm));
    }
}
