/* adapted from cyanobacteria.css */
/* find original at https://ribo.zone/free/layouts/cyanobacteria/preview# */

:root {
	--text: darkslategrey;
	--border: lightgrey;
	--accent: teal;
	--bg: #dce3e1;
	--gradientTop: white;
	--gradientBottom: rgb(240, 248, 255, .8);
}

header {
	background: url('https://ribo.zone/microscopy/dolichospermum.png');
}

@media (prefers-color-scheme: dark) {
	:root {
		--text: white;
		--border: #5a7678;
		--accent: #74C365;
		--bg: rgb(0, 60, 60, .8);
		--gradientBottom: rgb(0, 50, 60);
		--gradientTop: darkslategrey;
		a:link { color: lightblue; }
	}
	header {
		background: url('https://ribo.zone/microscopy/dolichospermum.png');
	}
}

* {
	box-sizing: border-box;
}

body {
	padding: 10px;
	font-family: 'MS PGothic', sans-serif;
	color: var(--text);

	/* page background pattern */
	background-color: var(--gradientTop);
	background-image:  linear-gradient(30deg, var(--bg) 12%, transparent 12.5%, transparent 87%, var(--bg) 87.5%, var(--bg)), linear-gradient(150deg, var(--bg) 12%, transparent 12.5%, transparent 87%, var(--bg) 87.5%, var(--bg)), linear-gradient(30deg, var(--bg) 12%, transparent 12.5%, transparent 87%, var(--bg) 87.5%, var(--bg)), linear-gradient(150deg, var(--bg) 12%, transparent 12.5%, transparent 87%, var(--bg) 87.5%, var(--bg)), linear-gradient(60deg, var(--bg) 25%, transparent 25.5%, transparent 75%, var(--bg) 75%, var(--bg)), linear-gradient(60deg, var(--bg) 25%, transparent 25.5%, transparent 75%, var(--bg) 75%, var(--bg));
	background-size: 20px 35px;
	background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;
}

.container {
	max-width: 75rem;
	margin: 1vw auto 12px auto;
	border: 6px ridge var(--border);
	outline: 3px solid var(--gradientTop);
	outline-offset: 4px;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	padding: 5px;
	gap: 5px;

	/* container background pattern */
	background-color: var(--gradientBottom);
	background-image: repeating-radial-gradient( circle at 0 0, transparent 0, var(--gradientBottom) 9px ), repeating-linear-gradient( var(--bg), var(--bg));
}

/* column widths */
.small { flex: 1 1 9%; }
.large { flex: 1 1 69%; }
.full { flex: 1 1 100%; }
.half { flex: 1 1 49%; }

header {
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 120px; /* change banner height here */
	border: 2px ridge var(--border);
	border-radius: 5px;
	position: relative;
}

header span {
	font-size: 2vw;
	position: absolute;
	bottom: 0;
	right: 10px;
	margin: 10px;
	font-weight: bold;
	text-shadow: 1px 1px var(--text),
		-1px 1px var(--text),
		1px -1px var(--accent),
		-1px -1px var(--accent);
	color: var(--gradientTop);
}

nav {
	border: 2px ridge var(--border);
	border-radius: 5px;
	padding: 5px;
	background: linear-gradient(var(--gradientTop),var(--gradientBottom));
	margin-bottom: 1vw;
}

nav div {
	text-align: center;
	font-size: 1.25rem;
	margin: 5px 5px 10px 5px;
}

nav a {
	display: block;
	margin: 5px;
	background: linear-gradient(to right, var(--bg),var(--gradientBottom));
	border-radius: 5px;
	padding: 2px 7px;
	text-decoration: none;
}

.small-nav-link {
	display: inline-block;
}


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

nav a:hover, nav a:focus {
	background: linear-gradient(to right, var(--bg), var(--gradientBottom), var(--gradientTop));
}

/* button styling */
div.small > img {
	display: block;
	margin: 5px auto;
	border:2px ridge var(--border);
	border-radius: 5px;
}


section {
	border: 2px ridge var(--border);
	border-radius: 5px;
	background: linear-gradient(var(--gradientTop),var(--gradientBottom));
	padding: 5px;
}


footer {
	text-align: left;
	margin-bottom: 1vw;
	font-size: 0.8rem;
	flex: 1 1 100%;
}
footer a {
	text-decoration: none;
}


h1, h2, h3, h4, h5, h6, p  {
	margin: 5px;
	line-height: 1.2;
}
h1 {
	font-size: 1.4rem;
	letter-spacing: 2px;
	font-weight: normal;
	text-align: center;
	border-bottom: 2px ridge var(--border);
	padding-bottom: 5px;
}
h2 {
	font-size: 1.25rem;
	font-weight: normal;
	text-align: center;
}
h3 {
	font-size: 1.1rem;
}
h4 {
	font-size: 1rem;
	color: var(--accent);
	padding-left: 12px;
}

/* prevents overflow on smaller screens */
img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
}
pre { overflow-x: auto; }

a:hover, a:focus {
	text-decoration: underline;
}
a:visited {
	color: var(--accent);
}

article {
	margin-bottom: 1rem;
}

/* YouTube embed */
.ytPlayerControlsContainerHost {
	max-width: 100vw;
	width: 100%;
	margin: 2em auto;
}

/* Wide images */
.kg-width-wide img {
	max-width: 1200px;
	width: 100%;
	margin: 2em auto;
}

/* Full width images */
.kg-width-full img {
	max-width: 100vw;
	width: 100%;
	margin: 2em auto;
}

/* Center standard images */
.kg-image-card {
	position: relative;
	display: inline-block;
	width: 100%;
	margin: 0 0 1.5em 0;
}

/* The caption overlay */
figure.kg-image-card figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0, 0, 0, 0.3); /* 30% black box */
	color: white;
	padding: 0.75em 1em;
	font-size: 0.8em;
	text-align: center;
	box-sizing: border-box;
}

/* Minimal layout for captions and standard images */
.kg-card {
	margin: 0 0 1.5em 0;
}

.kg-card-hascaption {
	text-align: center;
	font-size: 0.8em;
	color: #fff;
}

/*
Source - https://stackoverflow.com/a/67114537
Posted by thelovekesh
Retrieved 2026-04-06, License - CC BY-SA 4.0
*/

.youtube-player {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 5px;
  }

  .youtube-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: transparent;
  }

  .youtube-player img {
    object-fit: cover;
    display: block;
    left: 0;
    bottom: 0;
    margin: auto;
    max-width: 100%;
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    height: auto;
    cursor: pointer;
    -webkit-transition: 0.4s all;
    -moz-transition: 0.4s all;
    transition: 0.4s all;
  }

  .youtube-player img:hover {
    -webkit-filter: brightness(75%);
  }

  .youtube-player .play {
    height: 72px;
    width: 72px;
    left: 50%;
    top: 50%;
    margin-left: -36px;
    margin-top: -36px;
    position: absolute;
    background: url('/assets/images/yt_play_icon.png') no-repeat;
    cursor: pointer;
  }

/* Lightbox overlay */
.gg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  overflow: hidden;
}

/* Container that allows horizontal scroll for tall/wide images */
.gg-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto; /* enables scrolling when image is wider than viewport */
  -webkit-overflow-scrolling: touch;
  padding: 1rem; /* breathing room on small screens */
  box-sizing: border-box;
}

/* The image inside overlay */
.gg-overlay img {
  display: block;
  max-width: none; /* we'll control dimensions per class */
  max-height: 100vh;
  height: auto;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  user-select: none;
  -webkit-user-drag: none;
}

/* Normal images: scale up to fit viewport by width (but respect aspect) */
.gg-overlay img.gg-fit-width {
  max-width: 100vw;
  height: auto;
  max-height: 100vh;
}

/* Full-width (panoramic) images: make image height = viewport height,
   allow horizontal scrolling of container */
.gg-overlay img.gg-fit-height {
  height: 100vh;
  width: auto;
}

/* Prevent overlay showing scrollbars except when needed */
.gg-container::-webkit-scrollbar { height: 12px; }
