/* ==========================================================================
   Raquel Centeno — personal site
   Styled after academicpages / Minimal Mistakes (MIT, Michael Rose).
   Plain CSS with custom properties: edit the variables below to retheme.
   ========================================================================== */

:root {
  /* Palette (Minimal Mistakes "default" skin) */
  --gray: #7a8288;
  --dark-gray: #494e52;
  --darker-gray: #313436;
  --light-gray: #bdc1c4;
  --lighter-gray: #f2f3f3;

  --background-color: #fff;
  --text-color: var(--dark-gray);
  --muted-text-color: #676c70;
  --border-color: var(--lighter-gray);
  --footer-background-color: var(--secondary-color-tint);

  /* Secondary / accent color: masthead nav, footer, buttons, blockquotes */
  --secondary-color: #8a9a5b;
  --secondary-color-dark: #5f6b3f;   /* text-safe shade of the above */
  --secondary-color-tint: #f0f2e8;   /* footer background wash */

  --link-color: #5b6b9a;
  --link-color-hover: #414c6e;
  --masthead-link-color: var(--secondary-color-dark);
  --masthead-link-color-hover: #46512f;

  /* Typography */
  --sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  --monospace: Monaco, Consolas, "Lucida Console", monospace;

  --type-size-1: 2.441em;
  --type-size-2: 1.953em;
  --type-size-3: 1.563em;
  --type-size-4: 1.25em;
  --type-size-5: 1em;
  --type-size-6: 0.85em;
  --type-size-7: 0.75em;
  --type-size-8: 0.688em;

  /* Layout */
  --max-width: 1280px;
  --sidebar-width: 200px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (min-width: 48em)  { html { font-size: 18px; } }
@media (min-width: 64em)  { html { font-size: 20px; } }

body {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  font-family: var(--sans-serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
hr { display: block; margin: 1.5em 0; border: 0; border-top: 1px solid var(--border-color); }

a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--link-color-hover);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin: 2em 0 0.5em;
  line-height: 1.2;
  font-family: var(--sans-serif);
  font-weight: bold;
  color: var(--darker-gray);
}
h1 { margin-top: 0; font-size: var(--type-size-3); }
h2 { font-size: var(--type-size-4); }
h3 { font-size: var(--type-size-5); }
h4 { font-size: var(--type-size-6); }
h5 { font-size: var(--type-size-6); }
h6 { font-size: var(--type-size-7); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-text-color); }

p { margin: 0 0 1.3em; }

blockquote {
  margin: 2em 0;
  padding-left: 1em;
  border-left: 0.25em solid var(--secondary-color);
  font-style: italic;
}
blockquote cite { font-style: normal; font-size: var(--type-size-6); }

code, kbd, samp, pre { font-family: var(--monospace); font-size: 0.85em; }
code { padding: 0.15em 0.3em; background: var(--lighter-gray); border-radius: 3px; }
pre { padding: 1em; overflow-x: auto; background: var(--lighter-gray); border-radius: 4px; }
pre code { padding: 0; background: none; }

table { width: 100%; margin-bottom: 1.5em; border-collapse: collapse; font-size: var(--type-size-6); }
th, td { padding: 0.5em; border-bottom: 1px solid var(--border-color); text-align: left; }
th { font-weight: bold; border-bottom-width: 2px; }

::selection { background: #dfe4ce; }

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.5em 1em;
  background: var(--darker-gray);
  color: #fff;
}
.skip-link:focus { left: 0; top: 0; }
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px; width: 1px;
  overflow: hidden;
}

@keyframes intro { 0% { opacity: 0; } 100% { opacity: 1; } }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--border-color);
  border-top: 4px solid var(--secondary-color);
  background: var(--background-color);
  animation: intro 0.3s both;
}

.masthead__inner-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1em;
  font-family: var(--sans-serif);
}

.greedy-nav {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2em;
  background: var(--background-color);
}

.greedy-nav a {
  display: block;
  color: var(--masthead-link-color);
  text-decoration: none;
}
.greedy-nav a:hover { color: var(--masthead-link-color-hover); }

.greedy-nav .site-title {
  flex: 1;
  align-self: center;
  margin-right: 1em;
  font-weight: bold;
  font-size: var(--type-size-4);
  color: var(--darker-gray);
}
.greedy-nav .site-title:hover { color: var(--dark-gray); text-decoration: none; }

.greedy-nav .visible-links {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.greedy-nav .visible-links li { flex: none; }

.greedy-nav .visible-links a {
  position: relative;
  margin: 0 1rem;
  padding: 0.5rem 0;
  font-size: var(--type-size-6);
  font-weight: bold;
}
.greedy-nav .visible-links a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  background: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.2s ease-in-out;
}
.greedy-nav .visible-links a:hover::before { transform: scaleX(1); }
.greedy-nav .visible-links a.is--active { color: var(--secondary-color-dark); }
.greedy-nav .visible-links a.is--active::before { transform: scaleX(1); }
.greedy-nav .visible-links li:last-child a { margin-right: 0; }

/* Mobile menu toggle */
.greedy-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  height: 2em;
  width: 2em;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
}
.greedy-nav__toggle .navicon,
.greedy-nav__toggle .navicon::before,
.greedy-nav__toggle .navicon::after {
  display: block;
  width: 1.25rem;
  height: 3px;
  background: var(--secondary-color-dark);
  border-radius: 2px;
  transition: 0.2s;
}
.greedy-nav__toggle .navicon { position: relative; }
.greedy-nav__toggle .navicon::before,
.greedy-nav__toggle .navicon::after { content: ""; position: absolute; left: 0; }
.greedy-nav__toggle .navicon::before { top: -6px; }
.greedy-nav__toggle .navicon::after { top: 6px; }

@media (max-width: 47.9375em) {
  .greedy-nav { flex-wrap: wrap; }
  .greedy-nav .site-title { flex: 1 1 auto; }
  .greedy-nav__toggle { display: flex; }
  .greedy-nav .visible-links {
    display: none;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.5em;
    border-top: 1px solid var(--border-color);
  }
  .greedy-nav.is--open .visible-links { display: flex; }
  .greedy-nav .visible-links a { margin: 0; padding: 0.6rem 0; }
  .greedy-nav .visible-links a::before { display: none; }
}

/* --------------------------------------------------------------------------
   Main layout
   -------------------------------------------------------------------------- */

#main {
  max-width: var(--max-width);
  margin: 2em auto;
  padding: 0 1em;
  animation: intro 0.3s both;
  animation-delay: 0.15s;
}

.page { margin: 0; }

@media (min-width: 64em) {
  #main { display: flex; align-items: flex-start; }
  .sidebar {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    padding-right: 1em;
    opacity: 0.75;
    transition: opacity 0.2s ease-in-out;
    font-size: var(--type-size-6);
  }
  .sidebar:hover { opacity: 1; }
  .sidebar.sticky {
    position: sticky;
    top: 2em;
    max-height: calc(100vh - 4em);
    overflow-y: auto;
  }
  .page {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: var(--sidebar-width);
  }
}

@media (min-width: 64em) and (max-width: 79.9375em) {
  .page { padding-right: 2em; }
}

/* --------------------------------------------------------------------------
   Author sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--type-size-6);
}
@media (min-width: 64em) {
  .sidebar { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
}

.sidebar > div { display: flex; flex-wrap: wrap; align-items: flex-start; }
@media (min-width: 64em) { .sidebar > div { display: block; } }

.author__avatar { padding-right: 1em; }
.author__avatar img {
  width: 110px;
  border-radius: 50%;
}
@media (min-width: 64em) {
  .author__avatar { padding-right: 0; text-align: center; }
  .author__avatar img {
    width: 140px;
    padding: 5px;
    border: 1px solid var(--border-color);
  }
}

.author__content { flex: 1 1 60%; }
@media (min-width: 64em) { .author__content { margin-top: 0.5em; text-align: center; } }

.author__name {
  margin: 0;
  font-size: var(--type-size-4);
  color: var(--darker-gray);
}
.author__bio {
  margin: 0.25em 0 0;
  font-size: var(--type-size-6);
  line-height: 1.4;
  color: var(--muted-text-color);
}

.author__urls-wrapper { flex: 1 1 100%; }

.author__urls {
  margin: 1em 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--type-size-6);
}
@media (max-width: 63.9375em) {
  .author__urls { display: flex; flex-wrap: wrap; gap: 0 1.25em; }
}
.author__urls li {
  padding: 0.25em 0;
  white-space: nowrap;
  color: var(--muted-text-color);
}
.author__urls a { color: var(--text-color); }
.author__urls a:hover { color: var(--link-color-hover); text-decoration: underline; }
.author__urls i { margin-right: 0.5em; color: var(--light-gray); }
.author__urls a:hover i { color: var(--secondary-color-dark); }

/* --------------------------------------------------------------------------
   Page content
   -------------------------------------------------------------------------- */

.page__inner-wrap > header { margin-bottom: 1.5em; }

.page__title {
  margin: 0;
  line-height: 1.2;
  font-size: var(--type-size-3);
  color: var(--darker-gray);
}
.page__lead {
  margin: 0.35em 0 0;
  font-size: var(--type-size-4);
  font-weight: 400;
  color: var(--muted-text-color);
}

.page__content h2 {
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--border-color);
}
.page__content h3, .page__content h4, .page__content h5, .page__content h6 {
  margin-top: 1.75em;
}
.page__content p:first-child { margin-top: 0; }
.page__content ul, .page__content ol { margin-bottom: 1.3em; padding-left: 1.25em; }
.page__content li { margin-bottom: 0.35em; }

.page__content .archive__item-title { margin-top: 1.5em; }

/* Figures */
figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em 0;
}
figure img { border-radius: 4px; }
figcaption {
  margin-top: 0.6em;
  font-size: var(--type-size-7);
  line-height: 1.4;
  color: var(--muted-text-color);
  text-align: center;
}
figure.align-right { float: right; width: 40%; margin: 0.5em 0 1em 1.5em; }
figure.align-left  { float: left;  width: 40%; margin: 0.5em 1.5em 1em 0; }
@media (max-width: 47.9375em) {
  figure.align-right, figure.align-left { float: none; width: 100%; margin: 2em 0; }
}

/* Buttons */
.btn {
  display: inline-block;
  margin-bottom: 0.25em;
  padding: 0.5em 1em;
  font-family: var(--sans-serif);
  font-size: var(--type-size-6);
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--secondary-color-dark);
  color: #fff !important;
}
.btn:hover, .btn:focus { background-color: #46512f; text-decoration: none; }
.btn--info { background-color: var(--link-color); }
.btn--info:hover, .btn--info:focus { background-color: var(--link-color-hover); }
.btn i { margin-right: 0.5em; }

/* Notice boxes */
.notice--info {
  margin: 2em 0;
  padding: 1em;
  font-size: var(--type-size-6);
  background-color: var(--lighter-gray);
  border-radius: 4px;
  border-left: 0.25em solid var(--secondary-color);
}
.notice--info p { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.page__footer {
  margin-top: 3em;
  border-top: 4px solid var(--secondary-color);
  background: var(--footer-background-color);
  color: var(--muted-text-color);
  font-family: var(--sans-serif);
}
.page__footer footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2em 1em;
}
.page__footer a { color: var(--secondary-color-dark); text-decoration: none; }
.page__footer a:hover { text-decoration: underline; }

.page__footer-follow ul {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
.page__footer-follow li {
  display: inline-block;
  padding-right: 1.25em;
  font-size: var(--type-size-7);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.page__footer-follow li:last-child { padding-right: 0; }

.page__footer-copyright {
  font-size: var(--type-size-8);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .sidebar, .page__footer { display: none; }
  .page { padding: 0; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
