* {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;

  --green-hue: #46726198;
}

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:not(#subheader) {
  display: grid;
  grid: auto / 1fr 0.89fr 1fr;
}

@media screen and (max-width: 1365px) {
  header:not(#subheader) {grid: auto / min-content 0.3fr 1fr;}
}
@media screen and (max-width: 1100px) {
  header:not(#subheader) {grid: auto / min-content 0.2fr 1fr;}
}
@media screen and (max-width: 1050px) {
  header:not(#subheader) {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:not(#subheader) {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:not(#subheader) 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:not(#subheader) nav ul li:nth-child(2) {margin-left: 10px;}
header:not(#subheader) nav ul li:nth-child(3) {margin-left: 20px;}

header:not(#subheader) nav ul li:hover {
  animation: glitch 0.5s linear reverse;
}

header nav ul li a {
  color: inherit;
}

header nav ul li {
  text-wrap-mode: nowrap;
}

#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;}

#subheader h1 {
  font-family: "Ubuntu Bold";
  font-size: clamp(41px, 10vw, 80px);
  text-align: center;
}

.header-highlight {
  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;
}

#subheader h2 {
  font-size: clamp(15px, 4.3vw, 25px);
  font-family: 'Ubuntu Regular';
  text-align: center;
}
#subheader {margin-bottom: 1vw;}

form {
  min-height: 450px;
  height: 50vh;
  width: clamp(280px, 70vw, 600px);
  align-content: center;
  border: 0px solid transparent;
  border-radius: 100px / 50px;

  /* background: #1f2f1694; */
  background: var(--skill-table-alt);
  box-shadow:
    1px 1px 20px var(--green-hue) inset,
    -1px -1px 20px var(--green-hue) inset;
}

fieldset {
  font-family: 'Ubuntu Regular';
  
  height: 90%;
  width: 80%;
  margin-right: auto;
  margin-left: auto;
  
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;

  border: none;
}
fieldset > * {
  display: block;
}

fieldset legend {
  font-family: 'Ubuntu Medium';
  text-align: center;
  font-size: clamp(17px, 3.1vw, 20px);
}

input {
  width: clamp(210px, 70%, 336px);
  height: 10%;

  text-align: center;
  font-family: 'Ubuntu Regular';

  border: 0px solid transparent;
  border-radius: 40px;

  background: var(--skill-table);
  color: beige;

  box-shadow:
    1px 1px 10px var(--green-hue) inset,
    -1px -1px 10px var(--green-hue) inset;

  filter: drop-shadow(clamp(12px, 1.5vw, 15px) clamp(12px, 1.5vw, 15px) 6px black);
}
input:focus-visible {
  outline: none;
}

input:nth-child(2) {anchor-name: --name;}
input:nth-child(4) {anchor-name: --email;}
textarea:nth-child(6) {anchor-name: --text;}

label:nth-child(3) {position-anchor: --name;}
label:nth-child(5) {position-anchor: --email;}
label:nth-child(7) {position-anchor: --text;}

label {
  width: fit-content;
  bottom: anchor(top);
  position: absolute;

  margin-bottom: 11px;
}

textarea {
  width: clamp(210px, 70%, 336px);

  border: none;
  border-radius: 10px;
  box-shadow:
    1px 1px 10px var(--green-hue) inset,
    -1px -1px 10px var(--green-hue) inset;

  filter: drop-shadow(clamp(12px, 1.5vw, 15px) clamp(12px, 1.5vw, 15px) 6px black);

  background: var(--skill-table);
  color: beige;

  padding: 5%;

  text-align: center;
  align-content: center;
  text-wrap-mode: wrap;

  resize: none;
}
textarea:focus-visible {
  outline: none;
}

input::placeholder,
textarea::placeholder {font-style: italic; text-wrap-mode: nowrap;}
textarea::placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

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

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

  padding: 0.2vh;
  width: clamp(130px, 23vw, 145px);
  height: clamp(38px, 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 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 button:hover {
  span {
    animation: menu-button-blinking 500ms linear;
    color: mediumseagreen;
  }
}

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

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

@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 rotation {
  from {transform: rotate(0)}
  to {transform: rotate(0.5turn)}
}

@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);}
}
