/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

/* ========================================================
   Author: Khushaank Gupta
   File: main.css
   Description: Theme stylesheet for blog/portfolio website
   ======================================================== */

/* ========================================================
   THEME VARIABLES
   ======================================================== */

/* ---------- Light Theme (default) ---------- */
:root {
  --primary: #0034ff;
  --grey: #888;
  --bg: #ffffff;
  --text: #333333;
  --link-hover: #000000;
  --blockquote-bg: #f6f6f6;
  --highlight-bg: #f4f4f4;
  --border: #eeeeee;
  --border-dark: #dddddd;
  --footer-link: #666666;
  --tag-border: #333333;
}

/* ---------- Dark Theme ---------- */
body.dark {
  --primary: #4da3ff;
  --grey: #aaaaaa;
  --bg: #121212;
  --text: #e4e4e4;
  --link-hover: #ffffff;
  --blockquote-bg: #1e1e1e;
  --highlight-bg: #2a2a2a;
  --border: #333333;
  --border-dark: #444444;
  --footer-link: #aaaaaa;
  --tag-border: #e4e4e4;
}

/* ========================================================
   BASE STYLES
   ======================================================== */

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: Inter, sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.7em;
  font-size: 17px;
  background: var(--bg);
}

/* ---------- Links ---------- */
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
}

/* ---------- Code Blocks ---------- */
code {
  display: inline-block;
  background: var(--highlight-bg);
  color: var(--link-hover);
  padding: 3px 5px;
  font-size: 0.9em;
}
pre code {
  display: block;
}
.post .highlight {
  background: var(--highlight-bg);
  padding: 5px;
}

/* ---------- Images ---------- */
.post img {
  border-radius: 5px;
}
img {
  max-width: 100%;
}
a img {
  border: none;
}

/* ---------- Content Links ---------- */
.content a {
  word-break: break-word;
  text-decoration: underline;
  -webkit-text-decoration-color: var(--primary);
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
}
.content a:hover {
  -webkit-text-decoration-color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

/* ---------- Form Elements ---------- */
html,
button,
input,
select,
textarea {
  color: var(--text);
}
textarea {
  resize: vertical;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/* ---------- Text Selection ---------- */
::-moz-selection {
  background: var(--link-hover);
  text-shadow: none;
  color: var(--bg);
}
::selection {
  background: var(--link-hover);
  text-shadow: none;
  color: var(--bg);
}

/* ---------- Horizontal Rule ---------- */
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--border);
  margin: 15px 0;
  padding: 0;
}

/* ---------- Figures ---------- */
figure {
  margin: 30px 0;
  display: block;
  text-align: center;
}
figure figcaption {
  font-size: 0.775em;
  line-height: 0.775em;
  color: var(--grey);
  margin: 0;
}

/* ---------- Blockquotes ---------- */
blockquote {
  background: var(--blockquote-bg);
  font-style: italic;
  border-left: 5px solid var(--link-hover);
  padding: 5px 15px;
}
blockquote cite {
  font-size: 70%;
  opacity: 0.8;
}
blockquote em {
  font-weight: 600;
}

/* ---------- Headings ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.5em;
  margin: 45px 0 20px 0;
}
h1 {
  font-size: 2.75rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.6rem;
}
h4 {
  font-size: 1.2rem;
  line-height: 1.6rem;
}
h5 {
  font-size: 1rem;
}
h6 {
  font-size: 0.9rem;
}

/* ---------- Utility Classes ---------- */
.half {
  max-width: 60%;
}
.align-center {
  text-align: center;
}
.align-left {
  text-align: left;
}
.align-right {
  text-align: right;
}
.float-right {
  float: right;
}
figure.float-right {
  margin: 0 15px;
}
.text-small {
  font-size: 0.875em;
}
.prevent-collapse {
  min-height: 0.1rem;
}

/* ---------- Lists ---------- */
ul {
  padding-left: 15px;
}
ul.flat {
  margin: 0;
  padding: 0;
}
ul.flat li {
  display: inline-block;
  list-style: none;
  margin-left: 0;
}

/* ---------- Highlighted Code ---------- */
.highlight pre {
  margin: 0;
  padding: 20px;
  background-color: transparent !important;
}

/* ---------- Layout Wrappers ---------- */
.wrap {
  margin: 0 auto;
  padding: 60px 30px 30px 30px;
}
.container {
  max-width: 800px;
  min-width: 320px;
}

/* ========================================================
   HEADER
   ======================================================== */
.header {
  margin-bottom: 60px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.header .logo,
.header nav {
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
}
.header .logo .tagline {
  color: var(--grey);
  margin: 5px 0 0 0;
  font-size: 0.9em;
}
.header .photo {
  border-radius: 50%;
  width: 74px;
  height: 74px;
  -o-object-fit: cover;
  object-fit: cover;
  float: left;
  margin: -4px 30px 0 0;
}
.header nav {
  text-align: right;
  line-height: 1em;
}
.header nav a {
  display: inline-block;
  margin-left: 30px;
}
.header nav .feed img {
  width: 16px;
  height: auto;
}
.header .site-description nav {
  margin: 0 0 0 15px;
  padding: 0;
  border: none;
  min-width: 50px;
}
.header .site-description nav ul svg {
  max-height: 15px;
}
.Header-name {
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  font-size: larger;
}

/* ========================================================
   POSTS
   ======================================================== */
.section .section-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.posts {
  font-size: 0.9em;
  line-height: 1.6em;
  margin: 60px 0 30px 0;
  padding: 0;
}
.posts .post {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.posts .post:hover {
  background: var(--highlight-bg);
}
.posts .date {
  -webkit-box-flex: 10%;
  -ms-flex: 10%;
  flex: 10%;
  color: var(--grey);
}
.posts .date .year {
  color: var(--grey);
  font-size: 0.875em;
}
.posts .date .day {
  font-size: 1.5em;
  margin-bottom: 5px;
}
.posts .body {
  -webkit-box-flex: 70%;
  -ms-flex: 70%;
  flex: 70%;
}
.posts .title {
  margin: 0;
}
.posts .title a {
  text-decoration: none;
}
.posts .domain {
  color: var(--grey);
  font-size: 0.875em;
}
.posts .desc {
  margin-top: 10px;
}

.post-header {
  margin-bottom: 30px;
}
.post-header .date {
  margin: 0;
  color: var(--grey);
}
.post-header .title {
  margin: 0;
}

/* ========================================================
   PROJECTS
   ======================================================== */
.projects {
  margin-top: 60px;
}
.projects .status,
.projects .tags {
  color: var(--grey);
  font-size: 0.85em;
}
.projects h3 {
  margin: 0 0 10px 0;
}
.projects h3 a {
  padding-bottom: 5px;
  display: inline-block;
  border-bottom: 1px solid var(--border-dark);
  text-decoration: none;
}
.projects h3 a span {
  color: var(--grey);
  margin-right: 15px;
}
.projects li p {
  margin-bottom: 0.5em;
}
.projects li {
  margin-bottom: 2em;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}
.projects .desc {
  -webkit-box-flex: 70%;
  -ms-flex: 70%;
  flex: 70%;
}
.projects .thumb {
  -webkit-box-flex: 30%;
  -ms-flex: 30%;
  flex: 30%;
  text-align: right;
}

/* ========================================================
   TAGS
   ======================================================== */
.tag-cloud {
  margin-top: 20px;
}
.tag-cloud a {
  font-size: 1.1rem; /* slightly bigger */
  margin-right: 15px;
}
.tag-cloud a.active {
  font-weight: lighter; /* intentional lighter active state */
  text-decoration: underline;
  color: var(--primary);
  font-size: 1.2rem;
}
.tags a {
  display: inline-block;
  border: 1px solid var(--tag-border);
  border-radius: 3px;
  padding: 0px 6px;
  color: var(--text);
  line-height: 20px;
  font-size: 0.85em;
  text-decoration: none;
  margin: 0 10px 0 0;
}

/* ========================================================
   PAGINATION
   ======================================================== */
.pagination {
  padding: 0;
  text-align: center;
}
.pagination li {
  list-style: none;
  display: inline-block;
  margin: 0;
  padding: 0 10px;
}
.pagination li:first-child,
.pagination li:last-child {
  display: none;
}
.pagination .page-prev {
  margin-right: 20px;
  padding-right: 20px;
}
.pagination .page-item.page-prev {
  text-align: left;
}
.pagination .page-item.page-next {
  text-align: right;
}

/* ========================================================
   FOOTER
   ======================================================== */
.footer {
  text-align: center;
  font-size: 0.75em;
  color: var(--grey);
  margin: 30px 0;
}
.footer a {
  color: var(--footer-link);
}
.footer a:hover {
  color: var(--primary);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 670px) {
  .wrap {
    padding: 15px;
  }
  .content {
    margin: 0;
  }
}
@media (max-width: 575px) {
  .header {
    margin: 0 0 15px 0;
    display: block;
  }
  .header nav {
    display: block;
    text-align: left;
    margin-top: 30px;
  }
  .header nav a {
    margin: 0 15px 0 0;
  }
}
@media screen and (max-width: 480px) {
  .header .logo .tagline {
    font-size: 0.7em;
  }
}
@media (max-width: 350px) {
  .header .photo {
    float: none;
    display: block;
    margin-bottom: 15px;
  }
  .posts .date {
    margin-bottom: 5px;
  }
  .posts .post {
    display: block;
  }
}
