/*Colours*/
:root {
    --bg-color: #f2f0f0;  /*Oxford off white*/
    --fg-color: #002147;  /*Oxford blue*/
    --accent: #1D42A6;    /*Oxford royal blue*/
    --bold: #FB5607;      /*Oxford orange*/
}

/*Apply to all*/
html {
    box-sizing: border-box;
    background: var(--bg-color);
    color: var(--fg-color);
}
h1, h2 {
    color: var(--bold);
}

/* Dark mode */
:root:has(input:checked):has(.darkMode){
    --accent: #B9D6F2;    /*Oxford sky blue*/
}
*:has(input:checked):has(.darkMode){
    background: var(--fg-color);
    color: var(--bg-color);
    h1, h2 {
        color: var(--bg-color);
    }
}

/*Fonts*/
/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  src: url('./fonts/inter-v20-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: bold;
  font-weight: 700;
  src: url('./fonts/inter-v20-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 700;
  src: url('./fonts/inter-v20-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* archivo-narrow-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/archivo-narrow-v35-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* archivo-narrow-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Archivo Narrow';
  font-style: italic;
  font-weight: 400;
  src: url('./fonts/archivo-narrow-v35-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* archivo-narrow-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/archivo-narrow-v35-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* archivo-narrow-700italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Archivo Narrow';
  font-style: italic;
  font-weight: 700;
  src: url('./fonts/archivo-narrow-v35-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* space-grotesk-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/space-grotesk-v22-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* space-grotesk-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/space-grotesk-v22-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ibm-plex-sans-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/ibm-plex-sans-v23-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ibm-plex-sans-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  src: url('./fonts/ibm-plex-sans-v23-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ibm-plex-sans-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/ibm-plex-sans-v23-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ibm-plex-sans-700italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 700;
  src: url('./fonts/ibm-plex-sans-v23-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/*Responsive layout*/
html {
    font-size: 100%;
    line-height: 1.5;
    margin: 1rem 1rem;
    font-family: 'IBM Plex Sans';
}

@media (min-width: calc(720px + 2rem)) {
    html {
        margin: 1rem auto;
        max-width: 720px;
        /*font-size: calc(100% * 20 / 16);*/
    }
}

/*Animations*/
@keyframes fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100;
    }
}

@-moz-keyframes fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100;
    }
}

@-webkit-keyframes fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100;
    }
}

/*Hover*/
a {
    transition: 0.25s;
    color: var(--accent);
}
a:hover {
    color: var(--bold);
}

/*Body*/
body {
    font-family: inherit;
    animation: fade ease 2s;
    -moz-animation: fade ease 2s;
    -webkit-animation: fade ease 2s;
    -o-animation: fade ease 2s;
    -ms-animation: fade ease 2s;
}

/*Text styles*/
p {
    font-size: 1rem;
}

h1, h2, h3, summary {
    font-family: 'Space Grotesk';
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.0;
}

h2 {
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--bold);
    font-size: 1.5rem;
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.0;
}

summary {
    font-size: 1.25rem;
    line-height: 1.0;
}

/*Lists*/
li::marker {
    color: var(--accent);
}
ul {
    padding-left: 1.25rem;
}

img {
    transition: 0.25s;
}
img:hover {
    scale: 1.05;
}
