@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

:root {
    --mainCol: rgba(211, 211, 211, 0.7);
    --mainCol2: #a7a8a6;
    --fontCol: rgb(50, 50, 50);
    --linkCol: darkred;
    --hrC: darkred;
}

.dark-mode {
  --mainCol: black;
  --mainCol2: rgb(50, 50, 50);
  --fontCol: white;
  --linkCol: darkred;
  --hrC: #EE82EE;
  background-color: var(--mainCol2);
  color: var(--fontCol);
}

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

html {
  scroll-behavior: smooth;
}

body {
    background-color: var(--mainCol2);
    overflow-x: hidden;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin-inline: auto;
}

nav {
    height: 4rem;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3rem;
    background-color: var( --mainCol);
    border-radius: 0px 0px 25px 25px;
    border-bottom: 2px solid var(--linkCol);
    box-shadow: 0px 1px 0px 1px var(--linkCol);
    max-width: 1536px;
    margin: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 250px;
  list-style-type: none;
  z-index: 999;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
  transition: transform 0.3s ease-in-out;
}

.sidebar li, .sidebar li a {
  width: 100%;
}

.menu {
  display: none;
  font-size: 1.5rem;
  margin-right: 2rem;
  color: var(--linkCol);
}

.fa-xmark {
  margin-top: 1.4rem;
  font-size: 1.5rem;
  color: var(--linkCol);
}

nav * {
    text-decoration: none;
    color: var(--fontCol);
}

nav a:hover {
    color: var(--linkCol);
}

.dropdown  {
    display: inline-block;
    position: relative;
}

.dropdown:hover {
  background-color: var(--mainCol);
}

.dropdown:hover .content {
  display: block;
  background-color: var(--mainCol);
}

.dropdown:hover .fa-arrow-down {
  color: var(--linkCol);
}

.fa-fire {
    position: absolute;
    left: 6rem;
    color: var(--linkCol);
    font-size: 3rem;
}

.content {
    display: none;
    position: absolute;
    background-color: var(--mainCol);
    min-width: max-content;
    width: 100%;
    padding: 15px 2px;
    border-radius: 0% 0% 10% 30%;
    box-shadow: 0px 2px 0px 0px var(--fontCol);
    z-index: 1;
}

.content > a {
    font-size: 1rem;
    padding: 10px 6px 10px 7px;
    border-top: 2px solid var(--fontCol);
}

#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.text .h1 {
  line-height: 10rem;
}

.h1 {
  color: var(--linkCol);
  font-weight: 700;
  font-size: 5rem;
  text-align: center;
}

#h1 {
  color: white;
}

#h3 {
  font-size: 2.5rem;
  color: var(--fontCol);
}

h3 {
  color: white;
  font-size: 2rem;
  text-align: center;
  word-wrap: break-word;
  max-width: 900px;
}

#aboutMe {
  height: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 1em;
  justify-content: center;
  align-items: center;
  padding: 5rem;
}

figure {
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  grid-column: span 1;
  grid-row: span 1;
}

figure img {
  border-radius: 10px;
  max-width: 100%;
}

.subContainer2 {
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  grid-column: span 1;
  grid-row: span 1;
  border: 2px solid var(--linkCol);
  border-radius: 10px;
  background-color: var(--mainCol);
  max-width: 100%;
}

.subContainer > p {
  color: var(--fontCol);
  background-color: var(--mainCol2);
  padding-left: 15px;
  line-height: 2.1rem;
  font-size: 1.2rem;
}

.subContainer2 p {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fontCol);
  background-color: var(--mainCol2);
  padding: 10px;
  margin: 10px;

  transition: transform 0.3s ease, color 0.3s ease;
}

.subContainer2 p:hover {
  transform: translateY(-5px);
  color: var(--linkCol)
}

h2 {
  color: var(--fontCol);
}

.h4 {
  color: var(--linkCol);
  margin-bottom: 5px;
}

#mySkills {
  background-color: var(--mainCol);
  height: auto;
}

.h2, .h4, #boxWrapper{
  margin-left: 1rem;
}

#h4 {
  padding-top: 2rem;
}

#boxWrapper {
  height: auto;
  margin: 2rem 2rem 0 2rem;
  padding-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 5em;
}

.box {
  height: 15em;
  width: 25em;
  display: grid;
  grid-template-columns: subgrid;
  grid-row: span 2;
  padding: 2rem;
  text-align: center;
  background-color: var(--mainCol2);
  border-radius: 10px;
  color: var(--fontCol);

  transition: color 0.1s ease-in;
}

.box:hover {
  background-color: var(--fontCol);
  color: white;
}

.boxDark:hover {
  background-color: var(--fontCol);
  color: var(--mainCol);
}

.box p {
  font-size: 1.3rem;
}

.box .subText {
  font-size: 0.85rem;
}

.circle {
  z-index: -100;
  position: absolute;
  box-shadow: 0 0 1000px 50px var(--linkCol);
  top: 25rem;
}

.fa-flag, .fa-paintbrush, .fa-code, .fa-laptop, .fa-briefcase, .fa-headset {
  color: var(--linkCol);
  font-size: 2rem;
}

.anim {
  animation: autoShow both;
  animation-timeline: view(80% 20%);
}

@keyframes autoShow {
  from{
    opacity: 0;
    transform: translateY(200px) scale(0.3);
  } to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#projects {
  height: auto;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

#projects h1 {
  color: var(--linkCol);
}

option {
  padding: 10px;
}

#default {
  margin-bottom: 5px;
  color: var(--linkCol);
  font-size: 1.5rem;
}

.form-select:focus {
  border-color: var(--linkCol);
  box-shadow: 0 0 4px var(--linkCol);
}

.btn-danger {
  background-color: var(--linkCol);
  border: var(--linkCol);
}

#contact {
  height: auto;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url(../files/pexels-nguyen-khac-tien-252426281-12542838.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

form.container {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 600px;
}

form h1{
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  color: var(--linkCol);
}

form div {
  margin-top: 5rem;
}

span {
  color: var(--linkCol);
}

.col input, .mb-3 input {
  background: rgba(169, 169, 169, 0.3);
}

.mb-3 textarea {
  background: rgba(169, 169, 169, 0.3);
}

.form-control {
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--linkCol);
  box-shadow: 0 0 5px var(--linkCol)
}

label.form-label {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

textarea.form-control {
  resize: vertical; /* Allow resizing vertically */
}

footer {
  background-color: var(--mainCol);
  color: var(--fontCol);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0px -1px 3px rgba(0, 0, 0, 0.3);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-links, .social-links, .lang {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-links a, .social-links a, .lang a {
  text-decoration: none;
  color: var(--fontCol);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.footer-links a:hover, .social-links a:hover, .lang a:hover {
  color: var(--linkCol);
}

.social-links a {
  font-size: 1.5rem;
}

#hr {
  border: 1px solid var(--hrC);
  background-color: var(--hrC);
  height: 2px;
  width: 50%;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

#hr2 {
  border: 1px solid var(--hrC);
  background-color: var(--hrC);
  height: 2px;
  width: 25%;
}

.lang {
  display: flex;
  gap: 1rem;
}

.activeText {
  border-bottom: 2px solid var(--linkCol);
}

#preloader {
  background: #000 url(../files/1_i1yv42RrOYhvw7U2MM4qCg.gif) no-repeat center center;
  background-size: 25%;
  height: 100vh;
  width: 100%;
  position: fixed;
  z-index: 100;
  transition: opacity 0.5s ease-out;
}

footer label {
  width: 130px;
  height: 40px;
  position: relative;
  display: block;
  background: #ebebeb;
  border-radius: 200px;
  box-shadow: inset 0px 5px 15px rgba(0, 0, 0, 0.4), inset 0px -5px 15px rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
  transition: 0.3s;
}

footer label::after {
  content: "";
  width: 35px;
  height: 35px;
  position: absolute;
  top: 2.8px;
  left: 10px;
  background: linear-gradient(180deg, #cdcccc, #787878);
  border-radius: 35px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

#theme-toggle {
  height: 0;
  width: 0;
  visibility: hidden;
}

#theme-toggle:checked + label {
  background: #242424;
}

#theme-toggle:checked + label::after {
  left: 120px;
  transform: translate(-100%);
  background: linear-gradient(180deg, #777, #3a3a3a);
}

footer label > i {
  position: absolute;
  width: 120px;
  top: 10px;
  z-index: 100;
}

label:active::after {
  width: 80px;
}

label .fa-sun {
  top: 12px;
  left: 19px;
  fill: #fff;
  color: #d8860b;
  transition: 0.3s;
}

label .fa-moon {
  top: 12px;
  left: 97px;
  fill: darkgray;
  color: #7e7e7e;
  transition: 0.3s;
}

#theme-toggle:checked + label .fa-sun {
  fill: darkgray;
}

#theme-toggle:checked + label .fa-moon {
  fill: #fff;
}

#up {
  color: white;
  background-color: var(--linkCol);
  position: fixed;
  right: 4%;
  bottom: 18%;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  outline: none;
}

#down {
  color: white;
  background-color: var(--linkCol);
  position: fixed;
  right: 4%;
  bottom: 9%;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-top: 20px;
  border: none;
  outline: none;
}

.btnArr:hover {
  transform: scale(1.2);
}

#shape {
  position: absolute;
  background: var(--hrC);
  width: 200px;
  height: 200px;
  margin-top: 3rem;
  opacity: 0.2;
  margin-right: 69rem;
  clip-path: path("M 40,32 Q 90,0 160,40 L 140,60 Q 100,30 60,50 L 60,100 L 140,95 Q 160,100 140,120 L 60,120 L 60,160 Q 50,190 30,160 L 30,40 Z");
}