/* ryvan.fyi - von hand. kein framework, keine magie. */

@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/DMSerifDisplay-Regular.woff") format("woff");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/DMSerifDisplay-Italic.woff") format("woff");
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #fdfcf8;
  --text: #222;
  --muted: #777;
  --line: #ccc;
  --accent: #ff9a1f;   /* datumsstempel-orange */
  --link: #c06400;
  --visited: #8a5a2b;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161514;
    --text: #ddd8cf;
    --muted: #8d877e;
    --line: #3b3834;
    --link: #ffa53a;
    --visited: #d39a5c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161514;
  --text: #ddd8cf;
  --muted: #8d877e;
  --line: #3b3834;
  --link: #ffa53a;
  --visited: #d39a5c;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.6 Verdana, Tahoma, sans-serif;
}

#page {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

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

h1, h2, h3 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: normal;
  line-height: 1.15;
}
h1 { font-size: 34px; margin: 0; }
h1 a, h1 a:visited { color: var(--text); text-decoration: none; }
h1 span { color: var(--accent); }
h2 { font-size: 26px; margin: 28px 0 8px; }
h3 { font-size: 20px; margin: 24px 0 6px; clear: both; }

hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; clear: both; }

.small { font-size: 11px; color: var(--muted); }
.date { font-family: "VT323", "Courier New", monospace; font-size: 16px; color: var(--link); }
tt { font-family: "VT323", "Courier New", monospace; font-size: 16px; white-space: nowrap; }

#nav { margin: 6px 0; }
#nav b { font-weight: normal; text-decoration: underline var(--accent) 2px; text-underline-offset: 3px; }

#prefs { float: right; font-size: 11px; color: var(--muted); }
#prefs button {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* fotos: einfach rechts/links neben den text */
.pic { float: right; margin: 4px 0 10px 16px; width: 200px; }
.pic.l { float: left; margin: 4px 16px 10px 0; }
.pic.w { width: 260px; }
.pic img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.pic small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }

ul { padding-left: 18px; }
li { margin-bottom: 3px; }
.clear { clear: both; }

table { border-collapse: collapse; margin: 8px 0; }
th, td { border: 1px solid var(--line); padding: 3px 6px; text-align: left; vertical-align: top; }
th { font-weight: normal; color: var(--muted); }

blockquote { margin: 8px 0; padding-left: 10px; border-left: 2px solid var(--accent); color: var(--muted); }
pre { font: 12px/1.4 "Courier New", monospace; border: 1px solid var(--line); padding: 6px 8px; overflow-x: auto; }

/* posts (markdown) */
.post img { max-width: 100%; height: auto; border: 1px solid var(--line); }
.post code { font: 12px "Courier New", monospace; }
.post pre code { font: inherit; }
.post h4, .post h5, .post h6 { font-family: "DM Serif Display", Georgia, serif; font-weight: normal; font-size: 17px; margin: 18px 0 4px; }
.post table { max-width: 100%; display: block; overflow-x: auto; }
.post hr { margin: 20px 0; }

/* admin - bewusst schlicht */
.admin img.thumb { width: 90px; height: auto; border: 1px solid var(--line); display: block; }
.admin input.snippet { width: 100%; box-sizing: border-box; font: 11px "Courier New", monospace; margin-top: 4px; }
.admin input:not([type=checkbox]), .admin textarea, .admin select {
  font: 13px Verdana, Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 3px 5px;
  max-width: 100%;
}
.admin input[name=title], .admin input[name=slug], .admin textarea { width: 100%; box-sizing: border-box; }
.admin textarea { font: 12px/1.5 "Courier New", monospace; }
.admin .bar { margin: 0; }
.admin .bar button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.admin .err { color: #c0392b; }
.admin table { width: 100%; }

#footer { margin-top: 32px; font-size: 11px; color: var(--muted); }
#footer img { image-rendering: pixelated; vertical-align: middle; margin: 0 2px 4px 0; }
#counter { font-family: "VT323", "Courier New", monospace; font-size: 15px; color: var(--text); border: 1px solid var(--line); padding: 0 3px; }

@media (max-width: 480px) {
  .pic, .pic.l, .pic.w { float: none; width: auto; max-width: 300px; margin: 8px 0 12px; }
  #prefs { float: none; display: block; margin-bottom: 4px; }
}
