/* Base styles of every page (were the <style> block in includes/template.php) */

/* Variables and base */
:root{
  --font-family: sans-serif;
  --line-height: 1.4;
  --muted: #454545;
  --accent: #454545;
  --alt-row: #efefef;
  --dark-alt-row: #4e4d4d;
  --dark-bg: #363636;
  --link-hover-bg: white /* requested hover bg */
}

/* Base typography & layout */
html { height:100%; background-color: black; background-position: center; /*background-image:url("https://franmarin.es/background.gif"); background-size:cover; background-attachment:fixed; */}
body { margin:0 auto; max-width:560px; padding:15px 15px 24px; font-family:var(--font-family); line-height:var(--line-height); }
/* Footer at the bottom of the window on short pages, and always 24px between its last line and
   the end of the page:
   - the 24px is the body's bottom padding (a footer bottom margin collapsed through the body
     and was lost at the end of long pages);
   - the body is at least the window height (min-height leaves out its vertical padding:
     15px + 24px here; css/site.css and admin/login.css set their own), and the sticky footer
     (top: 100vh) is pushed down to its end. On long pages it doesn't move, and the page layout
     stays normal block flow, so margins collapse as before. */
body { min-height:calc(100vh - 39px); min-height:calc(100dvh - 39px); }
body > footer { position:sticky; top:100vh; }
img { width:100%; height:auto; display:block; }
a { text-decoration:none; color:inherit; }
a:hover { text-decoration:underline; color:inherit; background:transparent; }

/* Header / footer */
.bright-theme body { color: var(--accent); /*background: #ffffff;*/ }
.off body { color: #ffffff; /*background-color: var(--dark-bg);*/ }
.bright-theme h1, .bright-theme h2, .bright-theme h3 { line-height:1.2; }
.bright-theme h1 { margin:30px 0; }
header { margin:30px 10px 30px 0; text-align:center; }
footer { margin:30px 0 0 0; text-align:center; }
footer p { margin:0; }

/* Index list (common rules) */
.index { text-align:center; }
.index h1 { font-size:2em; margin: 30px 0; }
.index ul { list-style:none; margin:0; padding:0; text-align:center; }
.index ul li { border-top:1px solid rgba(255, 255, 255, 0.1); margin:0; font-size:1em;}
.index ul li:last-child { border-bottom:1px solid var(--muted); }
.index ul li div { display:inline-block; width:94%; }
.index ul li span { display:inline-block; width:6%; float:right; line-height:1.8; font-family:"Segoe UI Emoji"; }
.index ul li a { display:block; line-height:1.8; padding:0 10px; }

/* Theme-specific rows and link colors */
.bright-theme .index ul li a,
.bright-theme .index ul li a:link,
.bright-theme .index ul li a:visited,
.bright-theme .index ul li a:active { color: var(--accent); }
.bright-theme .index ul li:nth-child(odd) { background: var(--alt-row); }
.bright-theme .index ul li a:hover { color: #ffffff; background-color: var(--link-hover-bg) !important; text-decoration:none; }

.off .index ul li a,
.off .index ul li a:link,
.off .index ul li a:visited,
.off .index ul li a:active { color: #ffffff; }
.off .index ul li:nth-child(odd) { background: transparent; /*var(--dark-alt-row);*/ }
.off .index ul li a:hover { color: #363636; background-color: var(--link-hover-bg) !important; text-decoration:none; }

/* Small theme utility */
.off a { color: orange; }

/* Example special classes kept (computing etc.) */
.bright-theme .index ul li.computing { background: blue; }

/* Poem / misc */
.poem { text-align:center; }

/* Responsive adjustments */
@media only screen and (min-width:500px) {
  .index h1 { font-size:2em; }
  .index ul li { font-size:1.5em; }
}
