/*
Theme Name: Stereo (Exact layout port)
Theme URI: https://github.com/n0nspace/tumblr-themes
Author: Theme port for WordPress
Description: Classic WordPress theme recreating nonspace's Tumblr theme "Stereo" layout and styling, with WordPress Customizer controls for fonts, sizes, colors, background image, and toggles.
Version: 0.4.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stereo
Tags: blog, custom-colors, custom-background, custom-menu, sticky-post, two-columns, responsive-layout
*/

/* Variables (Tumblr -> WP) */
:root {
  --postWidth: calc(var(--postWidthPx) + 40px + 6px);
  --postWidthPx: 700px;
  --sidebarWidth: 300px;
  --layoutWidth: calc(var(--sidebarWidth) + var(--postWidth) + 50px);
  --barWidth: 0px;

  --fontSize: 15px;
  --headlineSize: 45px;
  --titleSize: 56px;
  --lineHeight: 120%;
  --textColor: #000;
  --fontFamily: 'Azeret Mono';
  --fontFamilySecondary: 'VT323';
  --fontFamilyTertiary: Helvetica, Arial, sans-serif;
  --fontWeight: 500;

  --background: var(--sidebarBackground);
  --menuBackground: transparent;
  --menuText: #ff1e00;
  --sidebarBackground: #fff;
  --sidebarText: #000;
  --postBackground: #fff;

  --accentColor: #ff1e00;
  --accentText: #000;
  --postBorders: #000;
  --tags: #000;
  --borders: 3px solid var(--postBorders);

  --bgImage: none;
  --bgRepeat: repeat;
  --bgSize: auto;
}

/* reset */
* { box-sizing: border-box; padding: 0; margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body { height: 100%; }

body {
  position: relative;
  font-size: var(--fontSize);
  line-height: var(--lineHeight);
  font-family: var(--fontFamily), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  min-height: 100vh;
  background: var(--background);
  background-image: var(--bgImage);
  background-position: center;
  background-attachment: fixed;
  background-repeat: var(--bgRepeat);
  background-size: var(--bgSize);
  color: var(--textColor);
  font-weight: var(--fontWeight);
}

::selection { background: var(--accentColor); color: var(--accentText); }
::-moz-selection { background: var(--accentColor); color: var(--accentText); }

a { color: inherit; }
aside a { text-decoration: none; color: var(--accentColor); transition: ease color 0.5s; }
aside a:hover { opacity: 0.5; }

pre {
  margin: 20px 10px;
  background: var(--sidebarBackground);
  padding: 10px 10px;
  font: var(--fontSize) monospace;
  letter-spacing: 0px;
  text-align: left;
  width: 100%;
  line-height: var(--lineHeight);
  white-space: pre-wrap;
  word-wrap: break-word;
}
code { font-family: monospace; }
small, sub { font-size: 0.9rem; }

.feather {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.permalink blockquote { margin: 10px 0; }

.caption ul, .caption ol { margin: 25px 0 15px 25px; text-align: justify; }
.caption li { margin: 5px 0 5px 15px; }

h3, h2, .caption h1, .npf_quote, .quote blockquote {
  font-family: var(--fontFamilyTertiary), sans-serif;
  font-size: var(--headlineSize);
}

h1, h2, .headlines, .npf_quote, h3, h4, .quote blockquote {
  text-align: left;
  line-height: 100%;
}

.caption h2, .caption h1 { font-family: var(--fontFamilySecondary); }

h3, .npf_quote, .quote blockquote { font-size: 1.5rem; font-style: italic; }

.headlines, .headlines a, .caption h1 {
  color: var(--textColor);
  font-family: var(--fontFamilySecondary);
  font-size: var(--headlineSize);
  font-weight: 500;
  text-decoration: none;
  display: block;
}

p { margin-bottom: 25px; }
.caption { word-break: break-word; }
blockquote {
  margin: 15px 0 15px 10px;
  padding-left: 25px;
  width: 96%;
  border-left: 2px solid var(--postBorders);
}

/* MENU */
#main_menu { width: auto; padding: 0; margin-bottom: 15px; }
#main_menu li { padding: 5px 20px 5px 0px; display: block; }
#main_menu a {
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  font-size: 1.2rem;
  color: var(--menuText);
  font-family: var(--fontFamilyTertiary);
}
#main_menu a:hover { text-decoration: underline; }

/* SIDEBAR */
aside {
  position: fixed;
  top: 0;
  left: calc(50% - (var(--layoutWidth) / 2));
  height: 100vh;
  width: calc(var(--sidebarWidth));
  z-index: 99;
  color: var(--sidebarText);
  justify-content: flex-end;
}

#aside_inner {
  padding-top: 15vh;
  flex: 1;
  height: 100%;
  padding: calc(15vh + 40px) 20px 40px 20px;
  max-width: 300px;
  right: 0;
  z-index: 1;
}

aside img.side_author {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  object-fit: cover;
}

aside .side_head { width: 100%; }
aside .side_head .headlines { font-size: var(--titleSize); line-height: 100%; margin-bottom: 15px; }

/*description*/
aside .side_desc { margin: 0px 0 15px; }
aside .side_desc p { margin: 0px 0; }

/*search*/
.search { width: 100%; display: flex; flex-direction: row; margin-top: 20px; }
#search_bar { position: relative; }
.search form { flex: 1; }
.search input {
  height: 25px;
  width: 100%;
  border: 0;
  font-size: var(--fontSize);
  background: transparent;
  color: var(--textColor);
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--postBorders);
}
.search input:focus { border: 0; box-shadow: none; outline: 0; border-bottom: 1px solid var(--postBorders); }

::placeholder, ::-webkit-input-placeholder, ::-moz-placeholder, :-ms-input-placeholder, :-moz-placeholder {
  font-family: var(--fontFamily);
  color: var(--textColor);
}

/* BUTTONS / MOBILE */
input#mobile_button { display: none; }
#mobile_controls {
  z-index: 9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  background: var(--background);
  padding: 12px;
  display: none;
}
#mobile_controls::before {
  content: "";
  background-color: var(--textColor);
  background-repeat: no-repeat;
  height: 24px;
  width: 24px;
  -webkit-mask: url("https://raw.githubusercontent.com/feathericons/feather/8263ca93c4b338dcfafed62321c27a88368ba7cc/icons/menu.svg");
  mask: url("https://raw.githubusercontent.com/feathericons/feather/8263ca93c4b338dcfafed62321c27a88368ba7cc/icons/menu.svg");
}
input#mobile_button:checked ~ #mobile_controls::before {
  -webkit-mask: url("https://raw.githubusercontent.com/feathericons/feather/8263ca93c4b338dcfafed62321c27a88368ba7cc/icons/x.svg");
  mask: url("https://raw.githubusercontent.com/feathericons/feather/8263ca93c4b338dcfafed62321c27a88368ba7cc/icons/x.svg");
}

/* MAIN CONTAINER */
#container { position: relative; width: 100%; min-width: 250px; margin: auto; height: 100%; justify-content: center; }
#content_wrapper { position: relative; max-   width: calc(var(--postWidth) + 50px);
  margin-left: var(--sidebarWidth);
}
#post_wrapper { position: relative; color: var(--textColor); min-width: 250px; display: block; padding: 50px 25px; flex: 1; }

#pag-soc-wrapper { margin-top: 20px; }

.pagination { align-items: center; background: var(--sidebarBackground); font-family: var(--fontFamily); text-transform: uppercase; display:flex; }
.pagination .next_page { margin-left: 5px; }
.pagination .previous_page { margin-right: 5px; }
.pagination a { display: flex; align-items: center; }
.pagination a:hover { opacity: 0.8; }

/* POSTS */
.article_wrapper { width: 100%; padding: 50px 0 25px; }
.article_wrapper:first-of-type { padding-top: 0; }

.post { position: relative; height: auto; margin: auto; max-width: var(--postWidth); width: 100%; }
.post_header { margin-bottom: 15px; }
.post_body { width: 100%; }
.post_body .headlines { margin-bottom: 15px; }

/*caption container*/
.cpt { border: var(--borders); padding: 20px; background: var(--postBackground); }

.post_footer { margin-top: 5px; padding: 10px 0; font-size: 0.9rem; text-align: justify; }

.caption { margin-top: 0px; line-height: var(--lineHeight); text-align: justify; font-size: var(--fontSize); color: var(--textColor); }
.caption h2 { margin-bottom: 10px; width: 100%; text-align: left; font-size: 1.55rem; }

.caption p a, .caption ul a, .caption a {
  padding: 0 0px;
  color: var(--accentText);
  text-decoration: none;
  background: var(--accentColor);
  font-weight: bold;
}
.caption a:hover, .caption ul a:hover, .caption p a:hover { box-shadow: none; color: var(--accentColor); background: transparent; }

/* footer meta */
.ptags {
  margin: 5px 0 0 0;
  line-height: 110%;
  width: 100%;
  text-align: justify;
  display: none;
  font-family: var(--fontFamily);
  font-size: 0.9rem;
}
body.stereo-show-tags .ptags { display:block; }

.ptags a { color: var(--tags); text-decoration: none; }

.pdate a { color: var(--textColor); font-family: var(--fontFamily); text-decoration: none; }
.post_date a { text-decoration: underline; }

.post_author { text-transform: uppercase; }
.post_author a { font-style: italic; font-weight: bold; }

.post_icon.pinned {
  color: var(--textColor);
  text-transform: uppercase;
  font-family: var(--fontFamilyTertiary);
  line-height: var(--lineHeight);
  border: var(--borders);
  padding: 5px;
  display: inline-block;
  font-weight: bold;
  font-size: 1.2rem;
}

.buttons { justify-content: flex-end; align-items:center; display:flex; gap:10px; }
.buttons a, .custom_like_button { font-size: 20px; font-weight: bold; height: 20px; line-height: 100%; text-decoration:none; }
.buttons a:hover { color: var(--accentColor); }

.custom_like_button { position: relative; margin-left: 10px; }
.custom_like_button:hover { cursor: pointer; color: var(--accentColor); }

/* PERMALINK */
.permalink_page .article_wrapper { border-bottom: 0; }
.permalink { position: relative; max-width: var(--postWidth); margin: 50px auto 100px; }
.plnotes { margin: 25px 0; max-width: var(--postWidth); }
.plnotes ol { margin: 50px 0; padding: 0; list-style-type: none; }

/* CREDIT */
#nnspc { position: fixed; right: 15px; bottom: 15px; font-size: 25px; font-family: helvetica; font-weight: bold; z-index: 99; display: inline-block; }
#nnspc a { color: var(--textColor); text-decoration:none; }

/* Transitions */
.social a, .pagination a, #nnspc, #nnspc a, #sidebar_controls, .lh a, aside a, .post_icon, #mobile_controls, aside, .custom_like_button, .buttons a {
  transition: all 0.5s ease;
}

/* RESPONSIVE */
@media only screen and (max-width: 985px) {
  .article_wrapper:first-of-type { margin-top: 100px; }
  #post_wrapper { margin: 0 auto; }
  aside { left: calc(var(--sidebarWidth) * -1); width: var(--sidebarWidth); position: fixed; }
  #aside_inner { padding-top: 80px; }
  aside .side_head .headlines { font-size: 2.5rem; }
  aside .pagination:not(.copyright) {
    position: fixed; z-index: 7; right: 0px; top: 0; margin: 0 !important; padding: 15px 50px 15px 15px;
    width: 100vw; max-width: 100vw; justify-content: flex-end; display: flex;
  }
  #mobile_controls { display: flex; left: 0; z-index: 9999; }
  input#mobile_button:checked ~ aside { left: 0; z-index: 999; background: var(--background); }
  input#mobile_button:checked ~ #mobile_controls { left: var(--sidebarWidth); }
  #content_wrapper { margin: 0 auto; }
}




@media (min-width: 986px){
  #aside_inner{
    padding: 60px 20px 40px 20px !important;
  }
}
