@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400&display=swap");

/* Primer CSS subset (only what this site uses) */
.px-2 { padding-left: 8px; padding-right: 8px; }
.mb-2 { margin-bottom: 8px; }
.mb-5 { margin-bottom: 32px; }
@media (min-width: 768px) { .mb-md-6 { margin-bottom: 40px; } }

/* Design tokens */
:root {
  --colour-text:   hsl(120, 10%, 88%);
  --colour-accent: hsl(120, 66%, 80%);
  --colour-pop:    hsl(120, 20%, 80%);
  --colour-light:  hsl(120, 6%,  20%);
  --colour:        hsl(120, 6%,  10%);
  --colour-dark:   hsl(120, 6%,  3%);
}

/* Base */
a, span, p, h1, h2, h3, h4, strong, div, .text, .title, .heading {
  color: var(--colour-text);
  font-family: "Open Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1 { font-weight: 100; font-size: 6.5rem; }
a  { color: var(--colour-accent); }

html {
  color: var(--colour-pop);
  background: var(--colour-dark);
  background: -webkit-linear-gradient(to top, var(--colour), var(--colour-dark)) fixed;
  background: linear-gradient(to top, var(--colour), var(--colour-dark)) fixed;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

main {
  display: block;
  text-align: center;
  margin: 0 auto;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

section {
  max-width: 40rem;
  margin: 0 auto;
}

.content {
  text-align: center;
  max-width: 29rem;
  margin: 0 auto;
}

.text-center  { text-align: center; }
.heading      { margin-bottom: 1.5rem; }
.title        { margin-bottom: 1rem; }
.no-link-line { text-decoration: none; }

/* Divider */
.divider {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 1rem 0;
}
.divider hr {
  flex-grow: 1;
  margin: 0 1.5rem;
  border: 0;
  border-top: 2px solid;
  opacity: 0.33;
}
.divider .divider-content { transform: translateY(-50%); }

/* Layout helpers */
.flex               { display: flex; }
.flex.space-between { justify-content: space-between; }
.flex.flex-row      { flex-direction: row; }
.flex.flex-col      { flex-direction: column; }

/* Site header nav */
.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  margin-left: 1rem;
}

/* Links section (GitHub / LinkedIn / CV) */
.kubedev a.link {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--colour-accent);
}
.kubedev a.link span       { color: inherit; }
.kubedev a.link svg        { max-width: 2rem; fill: var(--colour-text); transform: translateY(25%); }
.kubedev a.link .link-name {
  display: inline-block;
  width: 5rem;
  text-align: left;
  text-decoration: underline;
  transition: color 0.22s ease-in-out;
}
.kubedev a.link .link-icon {
  display: inline-block;
  margin: 0 0.5rem;
  border: 3px solid var(--colour-text);
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 3rem;
  min-width: 3rem;
  position: relative;
  transform: translateY(1rem);
}
.kubedev a.link .link-icon svg {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%) scale(1.25);
  transition: transform 0.22s ease-in-out;
}
.kubedev a.link .icon-cv .fill-dark path { fill: black; }
.kubedev a.link:hover {
  color: var(--colour-pop);
  transform: scale(1.05);
}

/* Site logo (cube icon) */
.kubedev.icon { max-width: 3rem; }
.kubedev.icon svg {
  fill-rule: evenodd;
  clip-rule: evenodd;
  stroke-linejoin: round;
  stroke-miterlimit: 2;
  overflow: visible;
}
.kubedev.icon svg #border { fill: black; stroke: var(--colour-accent); stroke-width: 10px; stroke-linejoin: round; }
.kubedev.icon svg #cube   { fill: var(--colour-text); }
.kubedev.icon svg #shade  { fill: var(--colour); }

/* Animations */
.anim-fade-in-quick { animation: 0.5s cubic-bezier(0.11, 0.88, 0.86, 1) animQuick both; }
@keyframes animQuick {
  0%   { transform: translateY(2.5rem) scale(1.2); }
  100% { transform: translateY(0) scale(1); }
}

.anim-fade-in { animation: 1s cubic-bezier(0.11, 0.88, 0.86, 1) animOpacity both; }
@keyframes animOpacity {
  0%   { opacity: 0; transform: translateY(2.5rem) scale(1.2); }
  70%  { opacity: 0.1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.anim-delay-0 { animation-delay: 0s; }
.anim-delay-1 { animation-delay: 0.15s; }
.anim-delay-2 { animation-delay: 0.30s; }
.anim-delay-3 { animation-delay: 0.45s; }
.anim-delay-4 { animation-delay: 0.60s; }
.anim-delay-5 { animation-delay: 0.75s; }
.anim-delay-6 { animation-delay: 0.90s; }

/* Logo entrance animations */
@keyframes animIconIntroBorder {
  0%   { opacity: 0; fill: black; stroke: black; stroke-width: 0; }
  90%  { opacity: 1; fill: white; stroke: white; stroke-width: 20px; }
  100% { opacity: 1; fill: black; stroke: var(--colour-accent); }
}
.kubedev.icon #border { animation: 0.5s ease-in-out 0.5s animIconIntroBorder both; }

@keyframes animIconIntroCubeFall {
  0%   { opacity: 0; transform: translateY(-1.5rem); }
  50%  { opacity: 0; transform: translateY(-1.5rem); }
  95%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}
.kubedev.icon #shade,
.kubedev.icon #cube { animation: 1s ease-in-out 0.33s animIconIntroCubeFall both; }

@keyframes animIconIntroCubeShade {
  0%   { fill: transparent; }
  100% { fill: var(--colour); }
}
.kubedev.icon #shade { animation: 1s ease-in 1.5s animIconIntroCubeShade both; }

/* Footer */
footer {
  border-top: 1px solid hsla(0, 0%, 100%, 0.2);
  padding-top: 1rem;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-around;
  max-width: 50rem;
  margin: 0 auto;
}
footer .inline { display: inline; }
footer .block  { margin: 0 0.75rem; text-align: left; }
footer .block__heading { margin-bottom: 0.5rem; }
footer .block__content { margin-left: 1.5rem; margin-bottom: 1rem; }
footer .block__content a { margin-bottom: 0.2rem; display: block; text-wrap: nowrap; }
footer .block__content .icon { max-width: 1rem; }
footer .link      { text-underline-offset: 0.3rem; }
footer .link .icon { max-width: 0.9rem; }
footer .no-link-line { text-decoration: none; }
footer .pill {
  color: white;
  background-color: black;
  padding: 0.1rem 1.5rem 0.1rem 0.4rem;
  border-radius: 0.4rem;
  text-wrap: nowrap;
}
footer .pill .icon { position: relative; top: -0.15rem; vertical-align: middle; max-width: 1.2rem; }
footer a, footer svg, footer .icon,
footer a:focus, footer a:visited { color: inherit; }

@media (max-width: 450px) {
  footer { flex-direction: column; align-items: center; }
  footer .block { margin-bottom: 1rem; }
  footer .block__content { margin-left: 1rem; }
  footer small, footer .no-link { display: inline !important; }
}

/* Markdown blog post body */
.markdown-body {
  text-align: left;
  line-height: 1.6;
  font-size: 1.1rem;
}
.markdown-body p { margin-bottom: 1.25rem; }
.markdown-body h1, .markdown-body h2,
.markdown-body h3, .markdown-body h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--colour-accent);
}
.markdown-body h1 { font-size: 2.25rem; }
.markdown-body h2 { font-size: 1.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3em; }
.markdown-body h3 { font-size: 1.5rem; }
.markdown-body ul, .markdown-body ol { padding-left: 2rem; margin-bottom: 1.25rem; list-style: disc !important; }
.markdown-body li { margin-bottom: 0.5rem; display: list-item; }
.markdown-body ol { list-style: decimal !important; }
.markdown-body code { background-color: rgba(255,255,255,0.1); padding: 0.2rem 0.4rem; border-radius: 3px; font-family: monospace; }
.markdown-body pre { background-color: #1a1a1a; padding: 1rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1.25rem; }
.markdown-body pre code { background-color: transparent; padding: 0; }
.markdown-body blockquote {
  border-left: 4px solid var(--colour-accent);
  padding-left: 1rem;
  margin-left: 0;
  color: #999;
  font-style: italic;
  margin-bottom: 1.25rem;
}
.markdown-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 1rem 0; }
.markdown-body a {
  display: inline !important;
  margin-bottom: 0;
  text-decoration: underline;
  color: var(--colour-accent);
}
.markdown-body a:hover { color: var(--colour-pop); }

/* Blog listing page */
.post-item { margin-bottom: 2rem; }
.post-item h2 { margin-top: 0; margin-bottom: 0.25rem; font-size: 1.5rem; }
.post-date { color: #666; display: block; margin-bottom: 0.5rem; }

/* Responsive type */
@media (max-width: 768px) { h1 { font-size: 5rem; } }
@media (max-width: 544px) { h1 { font-size: 4rem; } }
