/*
  Styling ported from the Astro profile site.
  iA Writer Mono S is OFL-licensed (https://github.com/iaolo/iA-Fonts);
  falls back to system monospace if the files are absent.
*/

@font-face {
  font-family: 'iA Writer Mono';
  src: url('fonts/iAWriterMonoS-Regular.woff2') format('woff2'),
       url('fonts/iAWriterMonoS-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Mono';
  src: url('fonts/iAWriterMonoS-Italic.woff2') format('woff2'),
       url('fonts/iAWriterMonoS-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Mono';
  src: url('fonts/iAWriterMonoS-Bold.woff2') format('woff2'),
       url('fonts/iAWriterMonoS-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Mono';
  src: url('fonts/iAWriterMonoS-BoldItalic.woff2') format('woff2'),
       url('fonts/iAWriterMonoS-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --c-bg: rgb(242, 242, 242);
  --c-txt: #000000;
  --c-link: #cc0000;
  --ff: 'iA Writer Mono', ui-monospace, Menlo, 'Courier New', monospace;
  --fs: 1.1rem;
  --lh: 1.6;
  --k: 0.01em;
  --l: 1.5px;
  --s: 1rem;
  --w: 65ch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img, figure {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

body {
  background: var(--c-bg);
  color: var(--c-txt);
  font: var(--fs)/var(--lh) var(--ff);
  letter-spacing: var(--k);
  display: grid;
  grid-template-columns: minmax(auto, var(--w));
  grid-template-rows: auto 1fr auto;
  justify-content: center;
  min-height: 100dvh;
  padding: calc(var(--s) * 2);
}
/*
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--c-txt);
  color: var(--c-bg);
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}*/

p, pre, table, blockquote {
  margin-bottom: 1.4rem;
}

h1, h2, h3, h4, h5 {
  font-size: var(--fs);
  font-weight: 700;
  margin: 0;
}

h1 {
  margin-bottom: calc(var(--s) * 3);
}

h1 a {
  color: var(--c-txt);
}

a {
  color: var(--c-link);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--c-txt);
}

.marginIntro {
  margin-right: 17%;
  margin-top: calc(var(--s) * 3);
  margin-bottom: calc(var(--s) * 8);
}

.bottom-nav {
  display: flex;
  margin-top: calc(var(--s) * 3);
}

.bottom-nav a {
  flex: 1;
}

.bottom-nav a:nth-child(2) {
  text-align: center;
}

.bottom-nav a:last-child:not(:first-child) {
  text-align: right;
}

footer .contact {
  margin-top: var(--s);
  margin-bottom: 0;
  opacity: 0.6;
  font-size: calc(var(--fs) * 0.85);
}

@media (max-width: 1024px) {
  :root {
    --fs: 0.8rem;
    --lh: 1.6;
    --k: 0.015em;
    --l: 1.2px;
    --s: 0.6rem;
  }

  body {
    padding: calc(var(--s) * 1.5);
  }

  h1 {
    margin-top: calc(var(--s) * 2);
  }

  .marginIntro {
    margin-right: 0;
    margin-top: calc(var(--s) * 2);
    margin-bottom: calc(var(--s) * 4);
  }
}
