:root {
/* 
-s   = size
-fam = family
-br  = primary 
-se  = secondary
-te  = tertiary
-qu  = quaternary
-bo  = border
-bq  = blockquote
-bg  = background
-t   = text 
-a   = accent
-sp  = special
--bs = box-shadow
--mw = max-width
-w   = width
-h   = height
*/

  /* Font */
  --f-fam: 'EB Garamond', serif;

  --fs-body: 1.375rem;
  --fs-pr: 1.25rem;
  --fs-se: 1.125rem;
  --fs-te: 1rem;
  --fs-qu: 0.875rem;
  --fs-h1-idx: 3.75rem;
  --fs-h1: 2.25rem;
  --fs-h2: 1.625rem;

  /* Colors */
  --c-bg-body: #000000;
  --c-bg-dark: #121212;
  --c-bg-pr: #1c1c1c;
  --c-bg-te: #333333;
  --c-t-pr: #ffffff;
  --c-t-se: #eeeeee;
  --c-t-te: #e0e0e0;
  --c-t-a: #006eff;
  --c-a-sp-light-purple: #9460a5;
  --c-a-sp-purple: #802a77;
  --c-a-sp-blue: #4ba0c5;
  --c-a-sp-red: #d52a19;
  --c-a-sp-blue-n: #037dc9;
  --c-a-light-blue: #3793dd;
  --c-a-blue: #2271b1;
  --c-a-dark-blue: #135e96;
  --c-amazon-orange: #ff9900;
  --c-a-card: var(--c-a-sp-blue-n);

  /* Root Settings */
  -moz-tab-size: 4;
  tab-size: 4;
  color-scheme: dark; /* Keep consistent with iframe */
}

@media screen and (max-width: 600px) {
  :root {
    --fs-body: 1.1875rem;
    --fs-pr: 1.125rem;
    --fs-se: 1rem;
    --fs-te: 0.9375rem;
    --fs-qu: 0.875rem;
    --fs-h1-idx: 2.5rem;
    --fs-h1: 1.625rem;
    --fs-h2: 1.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

/* Resets and Top-Level Structure */
/* Setting box-sizing on all elements makes it easier to use content-box on container elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  color: var(--c-t-pr);
  font-family: var(--f-fam);
  font-size: var(--fs-body);
  font-kerning: auto;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--c-bg-body);
  transition: background 0.3s ease;
}

body::after {
  content: "";
  display: block;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #060606;
  transition: opacity 0.7s ease-in-out, visibility 0.7s ease-in-out;
  z-index: 999999;
  pointer-events: none;
  user-select: none;
}

body.ready::after {
  opacity: 0;
  visibility: hidden;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem 1rem 0;
}

@media screen and (max-width: 600px) {
  main {
    justify-content: flex-start;
  }
}

/* Text */
/* Headings */
h1, .h1,
h2, .h2 {
  color: var(--c-t-se);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  transition: color 0.3s ease;
}

h1, .h1 {
  font-size: var(--fs-h1);
  margin: 0 0 0.5rem;
}

h2, .h2 {
  font-size: var(--fs-h2);
}

/* p */
p {
  margin: 0 0 1.5rem;

  &:last-child {
    margin: 0;
  }
}

/* a */
a {
  color: var(--c-t-pr);
  text-decoration: none;
  transition: color 0.15s ease-in-out;

  &:hover {
    color: var(--c-a-light-blue);
  }
}

/* Elements */
/* Images */
img {
  max-width: 100%;
}

img,
svg {
  line-height: 1;
  vertical-align: middle;
}

svg {
  fill: currentColor;
}

/* Buttons and Inputs */
button {
  border-radius: 0;
}

button:focus:not(:focus-visible) {
  outline: 0;
}

.btn {
  --btn-color: var(--c-t-se);
  --btn-color-a: transparent;
  --btn-bg: none;
  --btn-bo: none;
  --btn-bo-radius: 6px;
  color: var(--btn-color);
  fill: var(--btn-color);
  text-align: center;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  padding: 0.375rem 0.5rem;
  background: var(--btn-bg);
  border: var(--btn-bo);
  border-radius: var(--btn-bo-radius);
  transition: color 0.15s ease-in-out, fill 0.15s ease-in-out, background 0.15s ease-in-out, border-color 0.15s ease-in-out!important;

  &:hover {
    text-decoration: none;
  }
}

.btn svg {
  pointer-events: none;
  user-select: none;
}

.btn-amazon {
  --btn-color: var(--c-white);
  --btn-color-a: var(--c-amazon-orange);
  --btn-bg: var(--c-amazon-orange);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    --btn-color: var(--c-t-pr);
    color: var(--btn-color);
    fill: var(--btn-color);
  }

  .btn-icon:hover {
    --btn-bg: var(--c-bg-te);
    --btn-color: var(--c-t-pr);
  }
}

.btn[disabled] {
  cursor: default;
}

::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

#intro {
  text-align: center;
  text-wrap: balance;
  max-width: 650px;
  margin: 0 auto 2.5rem;

  h1 {
    font-size: var(--fs-h1-idx);
    margin: 0 0 1rem;
  }
}

#projects {
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  display: block;
  border: 1px solid var(--c-t-te);
  border-radius: 16px;
  transition: box-shadow 0.25s ease;

  .h2 {
    color: currentcolor;
  }

  &:hover {
    color: #fff;
    box-shadow: 0px 0px 64px 4px rgba(255,255,255,0.55);
  }
}

.card-info {
  font-size: var(--fs-pr);
  padding: 1.5rem;
}

@media screen and (max-width: 600px) {
  #intro {
    margin: 0 auto 1rem;

    h1 {
      margin: 0 0 0.25rem;
    }
  }

  .card-info {
    padding: 1rem;

    .h2 {
      margin: 0 0 0.5rem;
    }
  }
}

#footer {
  font-size: var(--fs-tertiary);
  width: 100%;
  padding: 1rem;
}

#footer-menu {
  display: flex;
  justify-content: center;
  margin: 0 0 0.5rem;
}

.social {
  width: 2.25rem;
  height: 2.25rem;
}

#colophon {
  text-align: center;
  color: var(--c-t-te);
  font-size: var(--fs-qu);
  font-weight: 500;
  line-height: 1.1;

  a {
    text-decoration: underline;

    &:not(:hover) {
      color: var(--c-t-te);
    }
  }
}

/* Utility */
[hidden] {
  display: none!important;
}

.srt {
  word-break: normal;
  word-wrap: normal!important;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  overflow: hidden;
  position: absolute!important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}