/* ============================================================
   bluish.css — Bluish Media
   Derived from Persona Free theme (Publii), stripped to
   only the selectors actually used on this site.
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --page-margin: 10vmin;
  --page-width: 800px;
  --entry-width: 66ch;
  --navbar-height: 3rem;
  --border-radius: 3px;
  --featured-image-height: 40vmin;
  --animated-lines-time: 8s;
  --magic-number: 4rem;
  --baseline: .25rem;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-size: clamp(1rem, 1rem + (0.15 * ((100vw - 20rem) / 80)), 1.15rem);
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  --line-height: 1.6;
  --letter-spacing: 0em;
  --headings-weight: 700;
  --headings-transform: none;
  --headings-style: normal;
  --headings-letter-spacing: -0.03em;
  --headings-line-height: 1.2;

  --white: #F4F7FB;
  --black: #000000;
  --dark: #283149;
  --dark-rgb: 40, 49, 73;
  --gray-1: #5f5f74;
  --gray-2: #9196A2;
  --light: #d4d2e1;
  --lighter: #DBDDE6;
  --color: #6f689b;
  --color-rgb: 111, 104, 155;
  --page-bg: #f4f7fb;
  --text-color: #343435;
  --headings-color: #283149;
  --link-color: #6f689b;
  --link-color-hover: #283149;

  --box-shadow:
    0px 4.4px 4.5px -100px rgba(var(--dark-rgb), 0.174),
    0px 12.3px 12.5px -100px rgba(var(--dark-rgb), 0.25),
    0px 29.5px 30.1px -100px rgba(var(--dark-rgb), 0.326),
    0px 98px 100px -100px rgba(var(--dark-rgb), 0.5);
  --box-shadow-hover:
    0px 5.4px 4.5px -100px rgba(var(--dark-rgb), 0.174),
    0px 15px 12.5px -100px rgba(var(--dark-rgb), 0.25),
    0px 36.2px 30.1px -100px rgba(var(--dark-rgb), 0.326),
    0px 120px 100px -100px rgba(var(--dark-rgb), 0.5);
}

@media all and (min-width: 56.25em) {
  :root { --magic-number: 6rem; }
}

@media all and (min-width: 80.0625em) and (min-height: 50em) {
  :root { --magic-number: 8rem; }
}

/* --- Reset ------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

article, footer, header, main, nav, section { display: block; }
li { list-style: none; }
img { height: auto; max-width: 100%; vertical-align: top; }
button, input, select, textarea { font: inherit; }
address { font-style: normal; }

::selection { background: var(--color); color: var(--white); }
:focus-visible { outline: 2px solid var(--color) !important; outline-offset: 2px; }

/* --- Base ------------------------------------------------- */
html {
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  background: var(--page-bg);
  color: var(--text-color);
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  min-height: 100vh;
  overscroll-behavior: none;
  user-select: none;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: all .12s linear;
}
a:hover, a:active, a:focus { color: var(--link-color-hover); }

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--headings-color);
  font-family: var(--font-body);
  font-style: var(--headings-style);
  hyphens: manual;
  letter-spacing: var(--headings-letter-spacing);
  line-height: var(--headings-line-height);
  margin-top: calc(var(--baseline) * 11);
  text-transform: var(--headings-transform);
}

h1 { font-size: clamp(1.802rem, 1.802rem + .764 * (100vw - 20rem) / 80, 2.566rem); }
h2 { font-size: clamp(1.424rem, 1.424rem + .603 * (100vw - 20rem) / 80, 2.027rem); }
h3 { font-size: clamp(1.266rem, 1.266rem + .536 * (100vw - 20rem) / 80, 1.802rem); }
h4 { font-size: clamp(1.125rem, 1.125rem + .299 * (100vw - 20rem) / 80, 1.424rem); }
h5 { font-size: clamp(1rem,    1rem    + .266 * (100vw - 20rem) / 80, 1.266rem); }
h6 { font-size: clamp(1rem,    1rem    + .125 * (100vw - 20rem) / 80, 1.125rem); }

h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + * { margin-top: calc(var(--baseline) * 4); }

b, strong { font-weight: var(--font-weight-bold); }

p, dl, ol, ul, pre { margin-top: calc(var(--baseline) * 7); }
figure, hr, table   { margin-top: calc(var(--baseline) * 9); margin-bottom: calc(var(--baseline) * 9); }

ol, ul { margin-left: 3ch; }
ol > li, ul > li { list-style: inherit; padding: 0 0 calc(var(--baseline) * 2) 1ch; }

small  { font-size: .79rem; }
sub, sup { font-size: 65%; }

hr, .separator {
  background: none;
  border: none;
  height: auto;
  line-height: 1;
  max-width: none;
  text-align: center;
}
hr::before, .separator::before {
  content: "***";
  color: var(--dark);
  font-size: 1.266rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 1.266rem;
  padding-left: 1.266rem;
}

/* --- Layout ----------------------------------------------- */
.container {
  box-sizing: content-box;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--page-width);
  overflow: hidden;
  padding: 0 var(--page-margin);
}

.main { margin-top: var(--magic-number); }

/* --- Header / Nav ----------------------------------------- */
.header {
  align-items: center;
  display: flex;
  height: var(--navbar-height);
  margin-top: 2rem;
  max-width: var(--page-width);
  position: relative;
}

@media all and (min-width: 80.0625em) and (min-height: 50em) {
  .header { margin-top: 3rem; }
}

.logo {
  order: 1;
  color: var(--dark) !important;
  font-weight: var(--font-weight-bold);
  font-size: 1.424rem;
  line-height: 1;
  margin-right: auto;
  white-space: nowrap;
}

@media all and (max-width: 74.9375em) {
  .logo { text-align: center; }
}

.navbar { order: 3; position: relative; }

@media all and (min-width: 56.25em) {
  .navbar { order: 2; }
}

.navbar .navbar__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media all and (max-width: 56.1875em) {
  .navbar .navbar__menu { display: none; }
}

.navbar .navbar__menu li {
  display: block;
  font-size: .889rem;
  line-height: var(--line-height);
  padding: 0;
  position: relative;
  white-space: nowrap;
}

.navbar .navbar__menu li a {
  color: var(--link-color-hover);
  display: block;
  padding: 0 .75rem;
  transition: all .24s ease-out;
}

.navbar .navbar__menu li a:hover,
.navbar .navbar__menu li a:focus {
  color: var(--link-color);
  outline: 0;
}

.navbar .navbar__menu > li { line-height: var(--navbar-height); }

/* Active nav item */
.navbar .navbar__menu li.active > a {
  color: var(--link-color);
  font-weight: var(--font-weight-bold);
}

.navbar .navbar__toggle {
  background: var(--light);
  border: none;
  box-shadow: none;
  color: var(--link-color);
  cursor: pointer;
  display: block;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  z-index: 2004;
}

@media all and (min-width: 56.25em) {
  .navbar .navbar__toggle { display: none; }
}

/* --- Content ---------------------------------------------- */
.content { position: relative; }

.content__inner {
  max-width: var(--entry-width);
  margin: auto;
}

.content__header { padding-bottom: calc(var(--magic-number) / 2); }

.content__featured-image {
  margin-top: 0;
  margin-bottom: 0;
}

.content__featured-image__inner {
  background-color: var(--lighter);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: var(--featured-image-height);
}

.content__featured-image img {
  display: block;
  height: inherit;
  object-fit: cover;
  max-width: var(--page-width);
  width: 100%;
  box-shadow: 6px 0 10px rgba(0, 0, 0, .2);
  border-radius: 6px;
}

.content__title { margin-top: 0; display: none !important; }

.content__entry > :first-child { margin-top: 0; }

.content__entry a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-skip: ink;
}

/* Image loading animation */
img[loading] { opacity: 0; }
img.is-loaded { opacity: 1; transition: opacity 1s cubic-bezier(.215, .61, .355, 1); }

.is-img-loading { overflow: hidden; position: relative; }
.is-img-loading::before,
.is-img-loading::after {
  content: "";
  display: block;
  position: absolute;
  height: 100%;
  width: 2px;
  top: -100%;
  left: 20%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0,
    rgba(var(--color-rgb), .15) 75%,
    rgba(0,0,0,0) 100%
  );
  animation: preloader 2s cubic-bezier(.4,.26,0,.97) 0s infinite;
}
.is-img-loading::before { animation-delay: .2s; left: 80%; }

@keyframes preloader {
  0%   { top: -100%; }
  100% { top: 100%;  }
}

/* --- Animated lines --------------------------------------- */
@media all and (min-width: 56.25em) {
  .lines::after,
  .lines::before {
    content: "";
    display: block;
    position: absolute;
    height: 50vh;
    width: 2px;
    top: -50%;
    left: 20vw;
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0) 0,
      rgba(var(--color-rgb), .15) 75%,
      rgba(0,0,0,0) 0
    );
    animation: run var(--animated-lines-time) cubic-bezier(.4,.26,0,.97) 0s infinite forwards;
    z-index: -1;
  }
  .lines::before { animation-delay: 2s; left: 40vw; }
}

.lines--right::after  { animation-delay: 4s; left: 60vw; }
.lines--right::before { animation-delay: 6s; left: 80vw; }

@keyframes run {
  0%   { top: -50%; }
  100% { top: 100%; }
}

/* --- Footer ----------------------------------------------- */
.footer {
  border-top: 1px solid var(--light);
  color: var(--gray-1);
  font-size: .79rem;
  margin-top: var(--magic-number);
  margin-bottom: calc(var(--magic-number) / 2);
  padding-top: calc(var(--magic-number) / 3);
}

@media all and (max-width: 56.1875em) {
  .footer { padding-top: calc(var(--magic-number) / 2); text-align: center; }
}

@media all and (min-width: 56.25em) {
  .footer { display: flex; justify-content: space-between; }
}

.footer__copy { font-size: .79rem; }

.footer__bttop {
  background: var(--color);
  border: none;
  border-radius: 50%;
  bottom: calc(var(--baseline) * 5);
  line-height: 1;
  opacity: 0;
  padding: .45rem;
  position: fixed;
  right: 2rem;
  text-align: center;
  visibility: hidden;
  width: auto !important;
  z-index: 999;
  transform: translateY(1rem);
  transition: opacity .2s, transform .2s, visibility .2s;
}

@media all and (min-width: 56.25em) {
  .footer__bttop { bottom: calc(var(--baseline) * 10); }
}

.footer__bttop:hover { opacity: 1; transform: translateY(0); }
.footer__bttop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.footer__bttop > svg {
  fill: var(--white);
  height: 23px;
  margin: 0;
  width: 23px;
}
