/* Open Color - only the colors we use */
:root {
  --oc-gray-1: #f1f3f5;
  --oc-gray-3: #dee2e6;
  --oc-gray-4: #ced4da;
  --oc-gray-6: #868e96;
  --oc-gray-7: #495057;
  --oc-gray-8: #343a40;
  --oc-gray-9: #212529;
  --oc-blue-3: #74c0fc;
  --oc-blue-8: #1971c2;
  --oc-yellow-3: #ffe066;
}

/* Font faces - only weights we use */
@font-face {
  font-family: 'Piazzolla';
  src: url('../fonts/Piazzolla-Light.woff2') format('woff2');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Piazzolla';
  src: url('../fonts/Piazzolla-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Piazzolla';
  src: url('../fonts/Piazzolla-Medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Piazzolla SC';
  src: url('../fonts/PiazzollaSC-Medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

/* CSS Variables */
:root {
  --type-serif: "Piazzolla", serif;
  --type-caps: "Piazzolla SC", serif;
  --type-size: 18px;
  --type-weight: 400;
  --type-height: 1.4;
  --type-numeric: oldstyle-nums proportional-nums;
  --color-particles-text: var(--oc-gray-1);
  --color-particles-background: var(--oc-gray-9);
}

html,
html[data-theme="light"] {
  --color-background: var(--oc-gray-1);
  --color-text: var(--oc-gray-8);
  --color-heading: var(--oc-gray-8);
  --color-link: var(--oc-blue-8);
  --color-mark: var(--oc-yellow-3);
  --color-border: var(--oc-gray-4);
  --color-button: var(--oc-gray-6);
}

html[data-theme="dark"] {
  --color-background: var(--oc-gray-9);
  --color-text: var(--oc-gray-3);
  --color-heading: var(--oc-gray-3);
  --color-link: var(--oc-blue-3);
  --color-mark: var(--oc-gray-8);
  --color-border: var(--oc-gray-7);
  --color-button: var(--oc-gray-7);
}

/* Minimal grid system */
*, *::before, *::after { box-sizing: border-box; }
.container { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.justify-content-center { justify-content: center; }
.col, .col-sm-10, .col-md-8, .col-lg-6 { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; }
@media (min-width: 576px) { .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; } }
@media (min-width: 768px) { .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; } }
@media (min-width: 992px) { .col-lg-6 { flex: 0 0 50%; max-width: 50%; } }
.text-center { text-align: center; }

/* Base styles */
body {
  margin: 0;
  font-family: var(--type-serif);
  font-size: var(--type-size);
  font-weight: var(--type-weight);
  line-height: var(--type-height);
  font-variant-numeric: var(--type-numeric);
  background-color: var(--color-background);
  color: var(--color-text);
}

svg circle,
svg path {
  stroke: var(--color-text);
  stroke-width: 0.075em;
}

a {
  text-decoration: none;
  color: var(--color-link);
}
a:focus, a:hover {
  border-bottom: calc(var(--type-size) / 10) dotted var(--color-link);
  color: var(--color-link);
}

header {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5em;
  margin-bottom: 2em;
}

footer { margin: 2em 0; }
small { font-weight: 300; }

blockquote {
  padding-left: 1em;
  border-left: 0.1em solid var(--color-border);
  font-weight: 300;
}

hr { border-top: 0.1em solid var(--color-text); }

img {
  display: block;
  max-width: 100%;
  margin: 1em 0;
  border-radius: 0.25em;
}

cite {
  display: block;
  font-style: normal;
  margin-bottom: 1.5em;
}
cite::before { content: "— "; }

/* Headings */
h1, h2, h3 { color: var(--color-heading); }
h1 a, h2 a, h3 a { color: inherit; }
h1 a:focus, h1 a:hover, h2 a:focus, h2 a:hover, h3 a:focus, h3 a:hover {
  border-color: inherit;
  color: inherit;
}
h1 { font-size: 1.5em; }
#home h1 { margin-top: 1.5em; }
h2 { margin-top: 1.25em; font-size: 1.25em; }
h3 {
  margin-top: 1em;
  font-size: 1em;
  text-transform: lowercase;
  font-family: var(--type-caps);
  font-weight: 500;
}
h2 + h3 { margin-top: 0; }

/* Elements */
a.site-title {
  font-weight: 500;
  color: var(--color-heading);
}
a.site-title:focus, a.site-title:hover {
  border-color: inherit;
  color: inherit;
}

.toggle-bar {
  display: flex;
  justify-content: end;
  padding-top: 1.5em;
}

.toggle-icon {
  color: var(--color-heading);
}
.toggle-icon:focus, .toggle-icon:hover {
  cursor: pointer;
  border: none;
}
.toggle-icon:focus svg circle, .toggle-icon:focus svg path,
.toggle-icon:hover svg circle, .toggle-icon:hover svg path {
  stroke-width: 0.1em;
}

.contact ul {
  list-style-type: none;
  padding: 0;
}

.li-icon { margin-right: 0.25em; }

/* Particles */
#particles-js {
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-color: var(--color-particles-background);
}
#particles-js .particles-js-canvas-el {
  width: 100%;
  height: 99.5vh !important;
}
#particles-js .jumbotron {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fullscreen {
  min-height: 100vh;
}
.fullscreen h1, .fullscreen h2 {
  color: var(--color-particles-text);
}

/* Full-page particles mode */
#particles-js.particles-fullpage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}
#particles-js.particles-fullpage .particles-js-canvas-el {
  height: 100% !important;
}

.splash-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 20;
}
.splash-section h1, .splash-section h2 {
  color: var(--color-particles-text);
}
.splash-section .jumbotron {
  pointer-events: none;
}
.splash-section .particles-scroll {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.content-panel {
  position: relative;
  z-index: 20;
}
.content-panel .col,
.content-panel .col-sm-10,
.content-panel .col-md-8,
.content-panel .col-lg-6 {
  background-color: var(--color-background);
}

.particles-photo {
  width: 50%;
  border-radius: 50%;
  margin: auto;
  margin-bottom: 0.5em;
}

.particles-title {
  margin: 0;
  font-size: 2.5em;
  font-weight: 500;
  white-space: nowrap;
}

.particles-subtitle {
  margin: 0 0 1em 0;
  font-size: 1.25em;
  font-weight: 400;
}

.nowrap { white-space: nowrap; }

.particles-icon {
  margin: 0 0.5em;
  pointer-events: all;
}
.particles-icon svg {
  transform: scale(1.8);
}
.particles-icon svg circle, .particles-icon svg path {
  stroke: var(--color-particles-text) !important;
  stroke-width: 0.05em;
}
.particles-icon:focus, .particles-icon:hover {
  border: none;
}
.particles-icon:focus svg circle, .particles-icon:focus svg path,
.particles-icon:hover svg circle, .particles-icon:hover svg path {
  stroke-width: 0.075em;
}

.particles-scroll {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.particles-scroll .particles-icon {
  position: relative;
  animation: pulse 1s infinite;
}
.particles-scroll svg {
  transform: scale(2.7);
}

/* Pulse animation */
@keyframes pulse {
  from { opacity: .4; top: 0; }
  50% { opacity: 1; top: -1rem; }
  to { opacity: .4; top: 0; }
}

/* Media queries */
@media (prefers-color-scheme: dark) {
  html, html[data-theme="dark"] {
    --color-background: var(--oc-gray-9);
    --color-text: var(--oc-gray-3);
    --color-heading: var(--oc-gray-3);
    --color-link: var(--oc-blue-3);
    --color-mark: var(--oc-gray-8);
    --color-border: var(--oc-gray-7);
    --color-button: var(--oc-gray-7);
  }
  html[data-theme="light"] {
    --color-background: var(--oc-gray-1);
    --color-text: var(--oc-gray-8);
    --color-heading: var(--oc-gray-8);
    --color-link: var(--oc-blue-8);
    --color-mark: var(--oc-yellow-3);
    --color-border: var(--oc-gray-4);
    --color-button: var(--oc-gray-6);
  }
}

@media screen and (min-width: 768px) {
  body { font-size: 1.25em; }
  .particles-title { font-size: 3.5em; }
  .particles-subtitle { font-size: 1.75em; }
  .particles-icon { margin: 0 1em; }
  .particles-icon svg { transform: scale(2.4); }
  .particles-scroll svg { transform: scale(3.6); }
}

@media only print {
  body {
    font-size: 10pt;
    background-color: white;
    color: black;
  }
  a { color: black; }
  .pagination { display: none; }
  #cv header { margin: 0; }
  #cv .site-title { font-size: 1.5em; }
  #cv small { display: none; }
  #cv .toggle-icon, #cv .li-icon { display: none; }
}
