@font-face {
    font-family: 'DejaVuSansMono';
    src: url('/font/DejaVuSansMono.woff2');
}

:root {
  --bg: #141d21;
  --header: #223447;
  --card: #192734;
  --border: #38444d;
  --text: #6de1f2;
  --link: #2be597;
  --link-hover: #36916f;
  --accent: #d94b34;
  --header-text: #f0fac5;
  --date: #2296df;
}

* {
    font-size: 16px;
}

@media (max-width: 500px) { 
  * {
    font-size: 13px; 
  }
}  

body {
  border: 2px solid var(--date);
}

body, html {
  font-family: DejaVuSansMono, monospace, sans-serif;
  max-width: 900px;  
  padding: 1%;
  margin: 0 auto;
  background: var(--bg);
  color: var(--text);
} 

img {
  border: none;
  transition: border-color 0.2s, border-width 0.2s; 
  border: 2px solid var(--date);
}

p {
  margin-top: 0px;
  text-align: justify;
}

sup {
  vertical-align: 0.3em;
  font-size: 0.65em;
}   

div.heading {
  font-weight: bold;      
  text-transform: uppercase;
}

div.heading-text {
  border: 2px solid var(--accent);
  padding: 5px;
}

div.heading-text-header {
  border: 2px solid var(--accent);
  padding: 5px;
  font-size: 1.2em;
}

div.main-date {
  margin-bottom: 2ch;
  text-transform: uppercase;
  border: 2px solid var(--date);
  padding:3px;
  width: 200px;
  font-weight: bold;
  text-align: center;
}

tr {
  color: var(--accent);
}

header, .header {
  background: var(--header);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 1.5ch 2ch;
  transition: background 0.2s, color 0.2s;
}

.content{
  border: 2px solid var(--date);
  padding: 2%;
}

h1, h2, h3, h4, h5, h6, .heading {
  color: var(--header-text);
  border: none;
  margin-top: 1ch;
  margin-bottom: 1ch;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: bold;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.meta, .date, .subtitle, .subtle {
  color: var(--date);
  font-size: 0.95em;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: bold;
}

div.top-page {
  border: 2px solid var(--date); 
  padding: 1%;
}

.date {
  width: 200px;
  padding-right: 1em;
  font-size: 16px;
}
@media (max-width: 500px) {
  .date  {
    font-size: 13px;
  }
}
img:hover {
  border-color: var(--date);
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--date);
}

/* Gallery grid styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2em;
  margin: 2.5em 0 2em 0;
  justify-items: center;
}
.gallery-item img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 0;
  border: 2px solid var(--date); /* Always 2px to reserve space */
  box-sizing: border-box; /* Include border in size */
  display: block;
  margin: 0 auto;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: none;
}

.gallery-item img:hover {
  border-color: var(--date);
  box-shadow: 0 0 0 2px var(--date);
}

table.content-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

table.content-table td {
    padding: 2px 8px;
    vertical-align: top;
}

table.content-table td:first-child {
    width: 200px; 
    white-space: nowrap;
    padding-right: 1em;
}
@media (max-width: 600px) {
    table.content-table td:first-child {
        width: 160px;
    }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.img-row-inline img {
  display: inline-block !important;
}

.img-row-inline picture {
  margin-right: 1ch;
}
.img-row-inline picture:last-child {
  margin-right: 0;
}

.year-divider td {
  padding: 0.5em 0;
  border-bottom: 1px solid var(--accent);
}

.year-divider span {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
  padding: 2px 8px;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  border: 1px solid var(--accent);
}

.nav-bar {
  border: 2px solid var(--date);
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 6px;
  align-items: center; 
  width: 45ch;
  margin: 0 auto;
}  

@media (max-width: 500px) { 
  .nav-bar {
    width: 42ch;
    gap: 7px;
  }
}

.nav-bar a {
  text-decoration: none;
  border: 1px solid var(--date);
  padding: 2px 8px;
  background: var(--date);
  color: var(--bg);
  transition: background 0.2s, border 0.2s;

}
.nav-bar a:hover {
  background: var(--text);
  border: 1px solid var(--text);
}

hr {
  color: var(--date);
}