* {box-sizing: border-box; margin: 0; padding: 0;}

/* Color Definitions */
:root {
  --main-bg-circle: #008080;
  --main-bg-lines: #0a0a0a;

  --turquoise: #40e0d0;
  --aquamarine: #00391d;
  --yellowgreen: #9acd32;
  --darkgreen: #006400;
  --darkcyan: #114747;

  --skill-table: #3c3c3c94;
  --skill-table-alt: #3c3c3c6e;

  --button-circle: #3c3c3c;
  --dialog-bg: #1c2227;
  --dialog-button: #dc143c;
}

html {
  /* height: 100vh; */
  min-height: 100vh;
  background: 
    linear-gradient(to top, #1a237ec4 -200rem, transparent), linear-gradient(to left bottom, #004d40 -200rem, transparent),
    repeating-linear-gradient(-45deg, var(--main-bg-lines) -10px, transparent 15px), repeating-linear-gradient(45deg, var(--main-bg-lines) -10px, transparent 15px),
    radial-gradient(circle, var(--main-bg-circle) 1px, transparent 2px),
    black;
  background-size: auto, auto, cover, cover, 1rem 1rem;
  background-attachment: scroll, scroll, fixed, fixed, fixed;
  background-repeat: repeat, repeat, no-repeat, no-repeat, repeat;
  background-position: 0px 0px, 0px 0px, 0px 0px, 0px 0px, 8px 50px;
}

body {
  position: relative;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 30px);

  color: beige;
}

ul {
  list-style-type: none;
}

#main-logo {
  width: clamp(155px, 41vw, 279px);
  margin-top: 1vh;
  margin-left: 1vw;
}

header {
  display: grid;
  grid: auto / 1fr 0.89fr 1fr;
}

@media screen and (max-width: 1365px) {
  header {grid: auto / min-content 0.3fr 1fr;}
}
@media screen and (max-width: 1100px) {
  header {grid: auto / min-content 0.2fr 1fr;}
}
@media screen and (max-width: 1050px) {
  header {grid: auto / 1fr 1fr;}
  #main-container {grid-column: 2; margin-left: 1vw;}
}

/* This one rule is for the purpose */
/* of removing the element on mobile devices */
@media screen and (max-width: 950px) {
  header {justify-content: center; grid: auto / auto;}
}

/* End of this media queries section */

#main-container {
  margin-top: 2vh;
  grid-column: 3;
}
@media screen and (max-width: 950px) {
  #main-container {display: none;}
}
@media screen and (max-width: 1050px) {
  #main-container {grid-column: 2; margin-left: 1vw;}
}

#running-text-wrapper {
  grid-column: 2;
  justify-self: left;
}

header nav {
  font-family: "Fira Code", monospace;
  font-size: clamp(24px, 7vw, 43.2px);
  align-self: center;
  text-shadow:
    0.05em 0.05em darkred,
    0.07em 0.07em darkred,
    0.08em 0.08em darkblue,
    0.1em 0.1em darkblue,
    0.11em 0.11em darkgreen,
    0.13em 0.13em darkgreen;
  /* The following is left purely for debugging reasons */
  /* animation: glitch 1s linear infinite; */
}
header nav ul li:nth-child(2) {margin-left: 10px;}
header nav ul li:nth-child(3) {margin-left: 20px;}

header nav ul li:hover {
  animation: glitch 0.5s linear reverse;
}
header nav ul li a {
  color: inherit;
}

#nav-emoji {
  vertical-align: middle;
  animation: none;
  font-size: 0.7em;
  margin-left: 0.5vw;
  text-shadow:
    1px 1px darkred,
    2px 2px darkblue,
    3px 3px darkgreen;
}

#logo-nav-wrapper {display: flex;}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  font-family: 'Ubuntu Medium';
  font-size: 0.7em;

  width: 100%;
}
@media screen and (max-width: 450px) {
  footer {
    flex-wrap: wrap-reverse;
    justify-content: center;
    gap: 1vw;
  }
}

#copyright {
  color: gray;
}

#acknowledgements {
  color: yellow;
  background: none;
  border: none;
  cursor: help;
  font-family: 'Ubuntu Bold';
}

a {
  text-decoration: none;
  color: lightgray;
}

#running-text-wrapper span,
#console-container span {
  display: inline;
  font-size: 1.5rem;
  text-shadow: 
    1px 1px gray,
    2px 2px gray;
}

pre {
  display: inline;
  font-family: "Fira Code", monospace;
  font-size: 1.5rem;
  text-shadow: 
    1px 1px gray,
    2px 2px gray;
}

#console-text-container,
#console-container {
  font-size: 1.5rem;
  font-family: "Ubuntu Medium", sans-serif;
  letter-spacing: 1px;

  text-shadow: 
    1px 1px gray,
    2px 2px gray;
}
#console-container {margin-left: 1vw;}

#console-text-container,
#console-caret,
#console-container {
  display: inline-block;
}
@media screen and (max-width: 950px) {
  #console-container {display: none;}
}

main {
  display: flex;
  flex-direction: column;

  gap: 20px;

  align-items: center;
  justify-content: center;
}

#weather-container {
  width: fit-content;

  margin-right: auto;
  margin-left: auto;
  margin-bottom: max(-1.4vw, -20px);

  font-family: 'Fira Code Bold';
  font-size: clamp(10px, 3vw, 13.3px);
  text-align: center;
}
#weather-container > * {vertical-align: middle; display: inline-block;}
#weather-container img {height: clamp(65px, 6vw, 80px);}
#weather-container div p:nth-child(2) {font-style: italic;}

main h1 pre {
  font-family: "Ubuntu Bold";
  font-size: clamp(31px, 10vw, 80px);
}

.orange-text {
  color: transparent;
  background: linear-gradient(45deg, var(--turquoise), var(--aquamarine));
  background-attachment: fixed;
  background-clip: text;
  filter: drop-shadow(clamp(2px, 0.05em, 0.05em) clamp(3px, 0.06em, 0.06em) 2px purple);
  text-shadow: none;
}

main h2 {
  font-size: clamp(15px, 4.3vw, 25px);
  font-family: 'Ubuntu Regular';
}

#skill-table {
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#table-wrapper img {
  height: clamp(100px, 17.5vw, 140px);
  width: auto;

  filter: drop-shadow(10px 10px 10px black);

  cursor: context-menu;
}

#table-wrapper {
  padding: clamp(10px, 5.9vw, 25px);
  margin-right: auto;
  margin-left: auto;
  align-content: center;
  position: relative;

  /* background-color: #d3d3d394; */
  background-color: var(--skill-table-alt);
  border: 1px solid var(--yellowgreen);
  border-radius: 10px / 10px;

  width: clamp(100px, 70vw, 600px);
  height: 30vh;
  min-height: fit-content;

}
#table-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px / 10px;
  z-index: -1;
  
  clip-path: polygon(0 50%, 50% 0, -50% -50%);
  box-shadow: -3px -3px 7px 0px turquoise;
  transform: rotate(180deg);

  animation: pulse 3s ease-out infinite;
}
#table-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px / 10px;
  z-index: -1;
  
  clip-path: polygon(0 50%, 50% 0, -50% -50%);
  box-shadow: -3px -3px 7px 0px turquoise;

  animation: pulse 3s ease-out infinite;
}

main nav {
  display: flex;
  width: auto;
  justify-content: center;
  gap: clamp(12px, 4vw, 25px);
  margin-left: auto;
  margin-right: auto;
}

main nav button svg {height: 100%; pointer-events: none;}
main nav button svg:nth-child(1) {height: 60%;}
main nav button span {pointer-events: none;}

main nav button {
  display: flex;
  align-items: center;
  justify-content: space-evenly;

  padding: 0.2vh;
  width: clamp(79px, 23vw, 125.5px);
  height: clamp(15px, 9vw, 40px);
  font-size: clamp(11px, 3vw, 13.3px);
  font-family: 'Ubuntu Medium';
  position: relative;

  background: radial-gradient(circle, black, var(--button-circle), black) content-box;
  box-shadow: 1px 1px 6px darkcyan, -1px -1px 6px darkviolet;
  color: inherit;

  border: 1px solid transparent;
  border-radius: 20px/20px;
  overflow: clip;
}
main nav button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;

  background: conic-gradient(from 0deg, transparent 80deg, forestgreen 90deg, transparent 100deg 260deg, forestgreen 270deg, transparent 280deg);
  background-repeat: no-repeat;

  animation: rotation 5s ease-in-out infinite;
}

main nav button:hover {
  span {
    animation: menu-button-blinking 500ms linear;
    color: mediumseagreen;
  }
}

main nav button.active {
  svg:nth-child(1) {
    color: mediumseagreen;
  }
}

#coding-skills,
#other-skills {
  display: none;
}
#web-dev-skills {
  display: flex;
}

.skill-tables {
  flex-wrap: wrap;
  gap: clamp(10px, 7.5vw, 50px);
  justify-content: center;
}

/* ========================== */
/* Section With Dialogs */
/* ========================== */
dialog:focus-visible {outline: none;}

.dialog-wrapper {
  height: 90%;
  width: auto;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);

  display: flex;
  flex-direction: column;

  text-align: center;

  font-family: 'Ubuntu Regular';
  font-size: clamp(18px, 4.3vw, 25px);
}

.dialog-headers-wrapper {
  line-height: 5vh;
}
.dialogs {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 80%;
  height: 65%;
  align-content: center;

  background-color: var(--dialog-bg);
  color: inherit;

  border: 2px solid var(--yellowgreen);
  border-radius: 40px/40px 0 40px 0;
  scrollbar-width: none;

  box-shadow:
    5px 5px 18px var(--aquamarine) inset,
    -5px -5px 18px var(--aquamarine) inset;
}

.dialog-wrapper ul {
  margin-left: 5%;
  margin-right: 5%;
  list-style-type: square;
  text-align: center;
  list-style-position: inside;
  padding-bottom: clamp(25px, 4vw, 30px);
}

.dialog-wrapper hr {
  margin-block: clamp(10px, 3vw, 18px);
  border: 4px dashed darkorange;
  clip-path: polygon(100% 0%, 50% 40%, 0% 0%);
}

.dialogs button:not(.acknowledgements-buttons) {
  background-color: var(--dialog-button, crimson);
  color: inherit;

  width: 25%;
  max-width: 220px;
  min-width: 62px;

  border: 1px solid transparent;
  border-radius: 20px/20px 0 20px 0;
}
.dialogs button:not(.acknowledgements-buttons):focus-visible {outline: 2px dashed darkred;}

/* Section For Acknowledgements Dialog Styling */

#acknowledgements-dialog small {
  display: none;
}

#acknowledgements-dialog ul button {
  display: block;
  background: radial-gradient(circle, transparent, darkslategray, transparent);
  color: inherit;

  font-family: 'Ubuntu Medium';

  height: clamp(42px, 4vw, 55px);
  width: 30vw;
  min-width: 140px;
}

#acknowledgements-dialog ul button img {
  height: 70%;
  display: inline-block;
  vertical-align: middle;
}

#acknowledgements-dialog ul button p {
  display: inline-block;
  vertical-align: middle;
  margin-left: 2%;
  font-size: clamp(12px, 3vw, 15.3px);
}

#acknowledgements-dialog li:nth-child(even) button {
  margin-right: auto;
  border-radius: 0 10px 10px 0;
}
#acknowledgements-dialog li:nth-child(odd) button {
  margin-left: auto;
  border-radius: 10px 0 0 10px;
}

#acknowledgements-dialog ul li div {
  overflow: clip;
  width: 50%;

  margin-left: auto;
  margin-right: auto;
}

#acknowledgements-dialog ul {
  list-style-type: none;
  width: 100%;
}

#acknowledgements-dialog div.dialog-headers-wrapper {
  font-size: clamp(11px, 2.5vw, 18px);
  line-height: normal;

  padding-right: 2%;
  padding-left: 2%;
}

#acknowledgements-dialog h1 {
  margin-bottom: clamp(7px, 1vw, 20px);
}

#acknowledgements-dialog h2 {
  line-height: clamp(21px, 3.7vw, 31px);
}

main strong {
  font-size: clamp(8px, 2.3vw, 13px);
  text-wrap-mode: nowrap;
  color: var(--yellowgreen);
  font-family: 'Fira Code';
  text-align: center;
}

main strong hr {
  border: 3px solid darkcyan;
  margin-top: 5px;
  margin-bottom: 2px;
  clip-path: polygon(110% 0%, 50% 50%, -10% 0%);
}

/* ========================== */
/* Section With Animations */
/* ========================== */

@keyframes rotation {
  from {transform: rotate(0)}
  to {transform: rotate(0.5turn)}
}

@keyframes blinking {
  0% {opacity: 1;}
  50% {opacity: 0;}
  100% {opacity: 1;}
}

@keyframes glitch {
  0% {transform: translate(0%, 0%)}
  25% {transform: translate(5%, 5%); opacity: 0.75; filter: invert(1);}
  40% {transform: translate(-5%, -5%); opacity: 0.55; filter: sepia(1)}
  65% {transform: translate(10%, 15%); opacity: 0.55; filter: sepia(0.7) invert(0.8)}
  85% {transform: translate(5%, -10%); opacity: 0.85; filter: sepia(1) invert(0.6)}
  100% {transform: translate(-5%, 5%); opacity: 0.9; filter: sepia(0.5) invert(0.9)}
}

@keyframes pulse {
  0% {filter: brightness(1);}
  50% {filter: brightness(0.6);}
  100% {filter: brightness(1);}
}

@keyframes menu-button-blinking {
  0% {filter: brightness(1);}
  20% {filter: brightness(0.7);}
  25% {filter: brightness(0.4);}
  45% {filter: brightness(1);}
  60% {filter: brightness(0.6);}
  65% {filter: brightness(0.3);}
  90% {filter: brightness(1);}
}
