/* Reset the defaults because browsers be weird sometimes smh */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

/* === Fonts! === */
/* Don't you dare think about adding a lighter font weight, I will find you and I will hurt you. */
/* Accessibility matters! */

/* --- Maple Mono Regular --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-Regular.ttf.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
/* --- Maple Mono Italic --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-Italic.ttf.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* --- Maple Mono Medium --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-Medium.ttf.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --- Maple Mono Medium Italic --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-MediumItalic.ttf.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* --- Maple Mono Bold --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-Bold.ttf.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* --- Maple Mono Bold Italic --- */
@font-face {
    font-family: 'Maple Mono';
    src: url('../fonts/MapleMono-BoldItalic.ttf.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Finally, onto the boring things... */
body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Maple Mono';
}

.content-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
}

a {
  color: var(--accent);
  text-decoration: none;

  /* Anchor for the underline */
  position: relative;
}

/* Underline */
a::after {
  content: ''; 
  width: 100%;
  height: 2px;
  border-radius: 999px;
  
  position: absolute;
  left: 0;
  bottom: 0px;
  background-color: var(--accent);
  
  /* Animation */
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease-out;
}

/* Grow! */
a:hover::after,
a:focus-visible::after {
    transform: scaleX(1);
}

footer {
    text-align: right;
    padding: 0.5rem 1rem;
}

/* === Header Styles === */

#main-header {
    position: fixed;
    top: 1rem;
    right: 0rem;
    z-index: 999;
    
    display: flex;
    align-items: center;

    /* Start off-screen, -2.5rem is icon width */
    transform: translateX(calc(100% - 2.5rem - 2rem));

    transition: transform 0.5s ease;

    background-color: var(--surface);
    border-radius: 9999px 0 0 9999px;
    padding: 1rem;
}

#main-header.is-open {
    transform: translateX(0);
}

.menu-toggle {
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--accent);
    flex-shrink: 0; 
}

.menu-toggle svg {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

#main-header button {
    background-color: transparent;
}

#main-header button:hover {
    background-color: transparent;
}

#main-header.is-open .menu-toggle svg {
    transform: rotate(-360deg);
}

.main-nav {
    background-color: var(--background-surface);
    padding-left: 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text);
}