/* Variables */
:root {
  --light-gray: #e3e3e3;
  --gray: #c0c0c0;
  --dark-gray: #808080;
  --teal: #006666;
  --blue: #000080;

  --size-sm: 0.25rem;
  --size-md: 1rem;
  --size-lg: 1.75rem;

  --shadow-1: 1px 1px 0px 0.2px rgba(0, 0, 0),
    inset 1px 1px 0px 1px rgba(255, 255, 255, 0.3),
    inset -1px -1px 0px 1px rgba(0, 0, 0, 0.3);
  --shadow-2: inset 0px 1px 1px rgba(0, 0, 0, 0.3),
    inset 1px 0px 1px rgba(0, 0, 0, 0.3),
    inset 0px -1px 1px rgba(255, 255, 255, 0.3),
    inset -1px 0px 1px rgba(255, 255, 255, 0.3);
}

/* Font */
@font-face {
  font-family: "px_sans_nouveaux";
  src: url("assets/px_sans_nouveaux.ttf") format("truetype");
}

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

* {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ol,
ul {
  list-style: none;
}

a,
a:visited {
  color: inherit;
  text-decoration: none;
}

a:focus {
  outline: dashed 1px black;
}

/* Root */
:where(:root) {
  background-color: black;
  color: white;
  font-family: "px_sans_nouveaux", "Tahoma", "Verdana", sans-serif;
  font-size: 12px;
}

/* Canvas */
body {
  width: min(100%, 800px);
  margin-inline: auto;
}

/* Desktop */
main {
  aspect-ratio: 4 / 3;
  position: relative;
  background-color: var(--teal);
  border: var(--gray) solid var(--size-md);
  padding: var(--size-lg);
}

/* Icon */
nav {
  width: min-content;
}

ul > li {
  position: relative;
  margin-bottom: var(--size-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

ul > li > a::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Taskbar */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--size-md) var(--size-md) var(--size-md);
  background-color: var(--gray);
  color: black;
}

footer > a {
  background-color: var(--gray);
  padding: var(--size-sm) var(--size-md);
  box-shadow: var(--shadow-1);
}

footer > a:hover {
  background-color: var(--light-gray);
  box-shadow: var(--shadow-2);
}

footer > div {
  display: flex;
  gap: var(--size-md);
  align-items: center;
  background-color: var(--gray);
  padding: var(--size-sm) var(--size-md);
  box-shadow: var(--shadow-2);
}

/* Window */
section {
  position: absolute;
  top: 10%;
  left: 10%;
  border: var(--gray) solid var(--size-sm);
  background-color: var(--light-gray);
  color: black;
}

@media (min-width: 800px) {
  section::after {
    content: attr(id);
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    text-transform: capitalize;
    transform: translateY(2200%);
    background-color: var(--gray);
    padding: var(--size-sm) var(--size-md);
    box-shadow: var(--shadow-1);
  }
}

section > :nth-child(2) {
  max-width: 60ch;
  padding: calc(var(--size-lg) + var(--size-md)) var(--size-md) var(--size-md)
    var(--size-md);
  position: relative;
  box-shadow: var(--shadow-2);
}

section > :nth-child(2)::after {
  content: "File Edit View Help";
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--gray);
  width: 100%;
  height: var(--size-lg);
  font-size: 0.8rem;
  padding: var(--size-sm) var(--size-sm);
}

section > h2 {
  color: white;
  background-color: var(--blue);
  padding: var(--size-sm);
}

section > article {
  background-color: white;
}

section > ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-md);
}

section p > a,
section p > a:visited {
  color: blue;
  text-decoration: underline;
}

/* Interactivity */
section,
section:target ~ section:last-of-type {
  display: none;
}

section:target,
section:last-of-type {
  display: block;
  scroll-margin-top: 100vh;
}
