:root { --subject-spacing: 40px; } html, body { height: 100%; width: 100%; margin: 0; padding: 0; } body { background-color: #292929; font-family: "Roboto", serif; } .title_name { font-size: 50px; color: floralwhite; font-family: "Roboto Slab", "Times New Roman", Times, serif; text-align: center; } .title_name img { margin: 20px; height: 100px; width: auto; vertical-align: middle; } .spinMe { animation: spin 1s infinite linear; } .shakeMe { animation: shake 0.2s infinite linear; } @keyframes shake { 0% { transform: scale(1) translate(1px, 1px) rotate(0deg); } 25% { transform: scale(0.95) translate(-1px, -2px) rotate(-1deg); } 50% { transform: scale(0.9) translate(-3px, 0px) rotate(1deg); } 75% { transform: scale(0.95) translate(3px, 2px) rotate(0deg); } 100% { transform: scale(1) translate(-1px, 2px) rotate(-1deg); } } @keyframes spin { 0% { transform: rotate(0deg) scale(1); filter: hue-rotate(0deg) saturate(5); } 25% { transform: rotate(90deg) scale(2); } 50% { transform: rotate(180deg) scale(1); } 75% { transform: rotate(270deg) scale(2); } 100% { transform: rotate(360deg) scale(1); filter: hue-rotate(360deg) saturate(5); } } .supercontainer { padding-top: 3em; margin: auto; } .main { width: 50em; margin: 20px auto; text-align: center; } @media only screen and (max-width: 1024px) { .main { width: 35em; padding: 20px; } :root { --subject-spacing: 20px; } } @media only screen and (max-width: 768px) { .title_name img { margin: 10px; height: 60px; width: auto; } .title_name { font-size: 30px; } .main { width: 20em; padding: 20px; } } span.subjecttitle { height: 100%; font-family: "Roboto Slab", "Times New Roman", Times, serif; font-size: 20px; padding-right: 5px; } .subject:first-child { margin-top: 0; } .subject:last-child { margin-bottom: 0; } .subject { margin-top: var(--subject-spacing); margin-bottom: var(--subject-spacing); } .resourcelist { margin-top: 2px; background-color: white; border-style: solid; border-color: #292929; border-width: 1px; border-radius: 5px; a:first-of-type { .resource { padding: 15px 20px 10px 20px; border-radius: 5px 5px 0 0; } } a:last-of-type { .resource { padding: 10px 20px 15px 20px; border-radius: 0 0 5px 5px; } } a:only-of-type { .resource { border-radius: 5px; } } } .resource { position: relative; background-color: white; padding: 10px 20px 10px 20px; display: block; color: #333333; text-decorAtion: none; transition: background-color 200ms; } .resource:hover { background-color: #bde4ff; } .resource:active { box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.50) inset; } a { color: #000; text-decoration: none; cursor: pointer; }