/**
*
*/

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

html, body { height: 100%; }

:root {
    --page-bg: #fff; /* white */
    --text-color: #000; /* black */
    --link-color: #7D7D7D; /* very dark gray */
    --link-selected-color: #000; /* black */

    --wrapper-max-width: 75em;
    --edge-padding: clamp(0.25rem, 2vw, 1rem);

    --header-bg: #2c4e31; /* dark green */
    --site-name-color: #fff; /* white */
    --nav-color: #aaaaaa; /* medium gray */
    --nav-selected-color: #fff; /* white */

    --item-card-bg: #eee; /* light gray */

    --tag-bg: #000; /* black */
    --tag-text: #ddd; /* light gray (text) */

    --footer-bg: #444444; /* dark gray */
    --footer-text: #aaaaaa; /* medium gray */
    --footer-link: #aaaaaa; /* medium gray */
    --footer-link-hover: #fff; /* white */
    
    --nav-level1: #00000020;
    --nav-level2: #00000030;
    --nav-level3: #00000040;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: #222; /* very dark gray */
        --text-color: #ddd; /* light gray */
        --link-color: #aaaaaa; /* medium gray */
        --link-selected-color: #ddd; /* black */
        --item-card-bg: #333; /* dark gray */
    }
}

header, main, footer {
    padding-inline: var(--edge-padding);
}

body {
    font-family: 'Droid Sans', 'Helvetica', 'Arial', sans-serif;
    font-variant-ligatures: common-ligatures;
    text-rendering: optimizeLegibility;
    font-kerning: normal;

    font-size: 1rem;
    line-height: 1.6;

    color: var(--text-color);
    background: var(--page-bg);

    display: flex;
    flex-direction: column;
    text-align: center;
}

@media (hover: none) {
    body {
        background: var(--header-bg);
    }
}

a {
    text-decoration: none;
    font-weight: bolder;

    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover,
nav a.selected {
    color: var(--link-selected-color);
}

main {
    flex: 1 0 auto;
    background: linear-gradient(to bottom, #2c4e31 0%, #444444 100%);
}

header, footer { flex: 0 0 auto; }

.wrapper {
    max-width: var(--wrapper-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--wrapper-padding);
    text-align: left;
}

main .wrapper {
    background: var(--page-bg);
    padding: 2em;
    border-radius: 2em;
    
    height: 100%;
    box-sizing: border-box;
}

header {
    background-color: var(--header-bg);
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    justify-content: center;
}

header.navbar-small {
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
      padding-left: 1rem; /* keep horizontal padding consistent */
      padding-right: 1rem; /* keep horizontal padding consistent */
  }

.header-content {
    max-width: var(--wrapper-max-width);
    width: 100%;
    /*display: grid;*/
    column-gap: 2rem;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
}

header .logo {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
    align-self: start;
    height: 10rem;
    width: auto;
}

header .site-name {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    font-size: 4rem;
    color: var(--site-name-color);
    font-weight: 900;
    align-self: start;
    text-align: left;
}

.nav-large {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    align-self: start;
    justify-content: flex-end;
    text-align: right;
    color: var(--nav-color);
    font-weight: 900;
}

nav li {
    display: inline-block;
    margin: 0 0.5rem;
    line-height: 1.5rem;
}

nav a {
    color: var(--nav-color);
    font-weight: 900;
}

nav a:hover,
nav a.selected {
    font-weight: 900;
    color: var(--nav-selected-color);
}

.header-content-small {
    max-width: var(--wrapper-max-width);
    width: 100%;
    /*display: grid;*/
    column-gap: 2rem;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
}

header .logo-small {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    align-self: center;
    justify-self: center;
    height: 3rem;
    width: auto;
}

header .site-name-small {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    /*font-size: 2rem;*/
    font-size: 1.5rem;
    color: var(--site-name-color);
    font-weight: 900;
    align-self: center;
    justify-self: start;
    text-align: left;
}

.nav-small {
    grid-row: 2 / 3;
    grid-column: 1 / 4;
    align-self: start;
    justify-content: flex-end;
    text-align: left;
    color: var(--nav-color);
    font-weight: 900;
}

nav.nav-small li {
    display: block;
    margin-bottom: 1rem;
}

nav.nav-small li:has(.pageLink-single) {
    display: inline-block;
    margin-bottom: 0.1rem;
}

nav.nav-small li:has(.pageLink-single-end) {
    display: inline-block;
    margin-bottom: 1rem;
}

.nav-level1 {
    background: var(--nav-level1);
}

.nav-level2 {
    background: var(--nav-level2);
}

.nav-level3 {
    background: var(--nav-level3);
}

/*nav.nav-small ul {
    display: inline-block;
    position: relative;
    margin: 0 1em;
    padding: 0;
}

nav.nav-small ul:not(:last-of-type) {
    /*border-bottom: 1px solid var(--nav-selected-color);*/
/*}

nav.nav-small ul:last-of-type {
    display: block;
}*/

.fit-content {
    width: fit-content;
    justify-content: flex-end;
    justify-self: end;
}

.menu-icon {
    grid-row: 1 / 2;
    grid-column: 3 / 4;
    align-self: center;
    justify-self: end;
    font-size: 2.5rem;
    font-weight: 900;
    cursor: pointer;
}

.article-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.article-body {
    padding: 1rem 0rem 1rem 1rem;
    flex: 1 1 auto;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    background: linear-gradient(to left, rgba(44,78,49,0.07) 60%, transparent);
    color: var(--link-color);
    opacity: 0.1;
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    font-size: 1rem;
}

.article-card:hover .link-icon,
.article-body:hover + .link-icon {
    opacity: 1;
    background: linear-gradient(to left, var(--header-bg) 60%, transparent);
    color: #fff;
}

article > .link-icon + h1,
article > .link-icon + h2,
article > .link-icon + h3,
article > .link-icon + h4,
article > .link-icon + h5,
article > .link-icon + h6 {
         margin-top: 0;
     }

h1 {
    font-size: 2rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

p + h1 {
    margin-top: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

h4 {
    margin-top: 0.25rem;
    margin-bottom: 0.1rem;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
    margin-top: 0;
}

h1.inline,
h2.inline,
h3.inline,
h4.inline,
h5.inline,
h6.inline {
    display: inline;
}

h1:has(+ b) {
    margin-bottom: 0;
}

h1 + b {
    display: block;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

hr {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-top: 0;
}

p + p {
    margin-top: 0.75rem;
}

blockquote {
    font-style: italic;
    margin-top: 1rem;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 0.5rem solid var(--link-color);
}

blockquote:before {
  color: var(--header-bg);
  content: "\201D";
  font-size: 4rem;
  line-height: 0.1rem;
  margin-top: 1.2rem;
  margin-right: 2rem;
  margin-left: -3.5rem;
  vertical-align: -1.5rem;
  float: left;
  clear: left;
}

blockquote::after{
  content: '';
}

ul, ol {
    margin-left: 2rem;
}

.description {
    margin-bottom: 40px;
}

ul.item-list {
    margin-left: 0rem;
}

.item-list > li {
    border-radius: 1rem;
    background-color: var(--item-card-bg);
    display: block;
    margin-bottom: 1.5rem;
}

.item-list > li:last-child {
    margin-bottom: 0;
}

.item-list h1 {
    font-size: 1.8rem;
}

.tag-list {
    margin-top: 1rem;
    margin-left: 0rem;
}

.tag-list li,
.tag {
    font-size: 0.75rem;
    display: inline-block;
    background-color: var(--header-bg);
    color: var(--tag-text);
    min-width: 4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    margin-right: 1rem;
    text-align: center;
}

.item-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
}

.item-author {
    font-weight: 900;
    color: var(--text-color);
}

.item-source {
    font-weight: 400;
    font-style: italic;
    color: var(--text-color);
}

.item-summary {
    border-radius: 1rem;
    background-color: var(--item-card-bg);
    display: block;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.content {
    
}

.content:not(:first-child) {
    margin-top: 1rem;
}

.content:not(:last-child) {
    margin-bottom: 1rem;
}

.browse-all {
    display: block;
    margin-bottom: 30px;
}

.all-tags {
    list-style: none;
    margin-left: 0rem;
}

.all-tags li {
    list-style: none;
}

.section-intro {
    margin-bottom: 1.5rem;
}

.image-card {
    border-radius: 1rem;
    background-color: var(--item-card-bg);
    display: block;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.exif-data {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--item-card-bg);
}

.exif-data:not(:first-child) {
    margin-top: 1rem;
}

.exif-data:not(:last-child) {
    margin-bottom: 1rem;
}

.exif-data-point {
    flex: 0 1 auto;
    min-width: 8rem;
    box-sizing: border-box;
}

footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0;
    font-size: clamp(0.5rem, 2vw, 1rem);
    display: flex;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
}

footer .footer-content {
    width: 900px;
    max-width: 100%;
    display: inline-grid;
    column-gap: 2rem;
    grid-template-columns: auto 1fr 1fr auto;
    grid-template-rows: auto auto auto;
}

footer a {
    font-weight: 900;
    color: var(--footer-link);
}

footer a:hover {
    color: var(--footer-link-hover);
}

footer .logo {
    grid-row: 1 / 2;
    grid-column: 1 / 5;
    align-self: center;
    justify-self: center;
    width: auto;
    max-width: 100%;
}

footer .license-logo {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
    align-self: center;
    justify-self: left;
    width: 88px;
}

footer .license-text {
    grid-row: 2 / 3;
    grid-column: 2 / 5;
    width: auto;
}

footer .publish {
    grid-row: 3 / 4;
    grid-column: 1 / 3;
    align-self: center;
    justify-self: left;
    width: auto;
}

footer .rss {
    grid-row: 3 / 4;
    grid-column: 3 / 5;
    align-self: center;
    justify-self: right;
    width: auto;
}

footer > * + * {
    margin-top: 0.75rem;
}


/*
header > * { outline: 1px dashed rgba(255,0,0,0.4); }
main > * { outline: 1px dashed rgba(255,0,0,0.4); }
footer > * { outline: 1px dashed rgba(255,0,0,0.4); }
*/

