/* MVP.css v1.17.1 - https://github.com/andybrewer/mvp */

:root {
  --active-brightness: 0.85;
  --border-radius: 5px;
  --box-shadow: 2px 2px 10px;
  --color-accent: #118bee15;
  --color-bg: #fff;
  --color-bg-secondary: #e9e9e9;
  --color-link: #118bee;
  --color-secondary: #920de9;
  --color-secondary-accent: #920de90b;
  --color-shadow: #f4f4f4;
  --color-table: #118bee;
  --color-text: #000;
  --color-text-secondary: #999;
  --color-scrollbar: #cacae8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --hover-brightness: 1.2;
  --justify-important: center;
  --justify-normal: left;
  --line-height: 1.5;
  --width-card: 285px;
  --width-card-medium: 460px;
  --width-card-wide: 800px;
  --width-content: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root[color-mode="user"] {
    --color-accent: #0097fc4f;
    --color-bg: #333;
    --color-bg-secondary: #555;
    --color-link: #0097fc;
    --color-secondary: #e20de9;
    --color-secondary-accent: #e20de94f;
    --color-shadow: #bbbbbb20;
    --color-table: #0097fc;
    --color-text: #f7f7f7;
    --color-text-secondary: #aaa;
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Layout */
article aside {
  background: var(--color-secondary-accent);
  border-left: 4px solid var(--color-secondary);
  padding: 0.01rem 0.8rem;
}

body {
  background: var(--color-bg) url("../images/background.jpg") no-repeat center/cover;
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-family);
  line-height: var(--line-height);
  margin: 0;
  overflow-x: hidden;
  padding: 0;
  min-height: 100vh;
}

footer,
header,
main {
  margin: 0 auto;
  max-width: var(--width-content);
  padding: 3rem 1rem;
}

hr {
  background-color: var(--color-bg-secondary);
  border: none;
  height: 2px;
  margin: 2rem 0;
  width: 100%;
}

section {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--justify-important);
}

section img,
article img {
  max-width: 100%;
}

section pre {
  overflow: auto;
}

section aside {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  margin: 1rem;
  padding: 1.25rem;
  width: var(--width-card);
}

section aside:hover {
  box-shadow: var(--box-shadow) var(--color-bg-secondary);
}

[hidden] {
  display: none;
}

/* Headers */
article header,
div header,
main header {
  padding-top: 0;
}

header {
  text-align: var(--justify-important);
}

header a b,
header a em,
header a i,
header a strong {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

header nav img {
  margin: 1rem 0;
}

section header {
  padding-top: 0;
  width: 100%;
}

/* Nav */
nav {
  align-items: center;
  display: flex;
  font-weight: bold;
  justify-content: space-between;
  margin-bottom: 7rem;
}

nav ul {
  list-style: none;
  padding: 0;
}

nav ul li {
  display: inline-block;
  margin: 0 0.5rem;
  position: relative;
  text-align: left;
}

/* Nav Dropdown */
nav ul li:hover ul {
  display: block;
}

nav ul li ul {
  background: var(--color-bg);
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  display: none;
  height: auto;
  left: -2px;
  padding: 0.5rem 1rem;
  position: absolute;
  top: 1.7rem;
  white-space: nowrap;
  width: auto;
  z-index: 1;
}

nav ul li ul::before {
  /* fill gap above to make mousing over them easier */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.5rem;
  height: 0.5rem;
}

nav ul li ul li,
nav ul li ul li a {
  display: block;
}

/* Nav for Mobile */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  nav ul li {
    width: calc(100% - 1em);
  }

  nav ul li ul {
    border: none;
    box-shadow: none;
    display: block;
    position: static;
  }
}

/* Typography */
code,
samp {
  background-color: var(--color-accent);
  border-radius: var(--border-radius);
  color: var(--color-text);
  display: inline-block;
  margin: 0 0.1rem;
  padding: 0 0.5rem;
}

details {
  margin: 1.3rem 0;
}

details summary {
  font-weight: bold;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--line-height);
  text-wrap: balance;
}

mark {
  padding: 0.1rem;
}

ol li,
ul li {
  padding: 0.2rem 0;
}

p {
  margin: 0.75rem 0;
  padding: 0;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

pre {
  margin: 1rem 0;
  max-width: var(--width-card-wide);
  padding: 1rem 0;
}

pre code,
pre samp {
  display: block;
  max-width: var(--width-card-wide);
  padding: 0.5rem 2rem;
  white-space: pre-wrap;
}

small {
  color: var(--color-text-secondary);
}

sup {
  background-color: var(--color-secondary);
  border-radius: var(--border-radius);
  color: var(--color-bg);
  font-size: xx-small;
  font-weight: bold;
  margin: 0.2rem;
  padding: 0.2rem 0.3rem;
  position: relative;
  top: -2px;
}

/* Links */
a {
  color: white;
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  filter: brightness(var(--hover-brightness));
}

a:active {
  filter: brightness(var(--active-brightness));
}

a b,
a em,
a i,
a strong,
button,
input[type="submit"] {
  border-radius: var(--border-radius);
  display: inline-block;
  font-size: medium;
  font-weight: bold;
  line-height: var(--line-height);
  margin-top: -5px;
}

button,
input[type="submit"] {
  font-family: var(--font-family);
}

button:hover,
input[type="submit"]:hover {
  cursor: pointer;
  filter: brightness(var(--hover-brightness));
}

button:active,
input[type="submit"]:active {
  filter: brightness(var(--active-brightness));
}

a b,
a strong,
button,
input[type="submit"] {
  background-color: var(--color-link);
  border: 2px solid var(--color-link);
  color: var(--color-bg);
}

a em,
a i {
  border: 2px solid var(--color-link);
  border-radius: var(--border-radius);
  color: var(--color-link);
  display: inline-block;
  padding: 1rem 2rem;
}

article aside a {
  color: var(--color-secondary);
}

/* Images */
figure {
  margin: 0;
  padding: 0;
}

figure img {
  max-width: 100%;
}

figure figcaption {
  color: var(--color-text-secondary);
}

/* Forms */
button:disabled,
input:disabled {
  background: var(--color-bg-secondary);
  border-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

button[disabled]:hover,
input[type="submit"][disabled]:hover {
  filter: none;
}

form {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  display: block;
  min-width: var(--width-card);
  padding: 1.5rem;
  text-align: var(--justify-normal);
}

form header {
  margin: 1.5rem 0;
  padding: 1.5rem 0;
}

input,
label,
select,
textarea {
  display: block;
  font-size: inherit;
  max-width: var(--width-card-wide);
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  font-weight: normal;
  position: relative;
  top: 1px;
}

input[type="range"] {
  padding: 0.4rem 0;
}

input,
select,
textarea {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: calc(100% - 1.6rem);
}

input[readonly],
textarea[readonly] {
  background-color: var(--color-bg-secondary);
}

label {
  font-weight: bold;
  margin-bottom: 0.2rem;
}

/* Popups */
dialog {
  max-width: 90%;
  max-height: 85dvh;
  margin: auto;
  padding-block: 0;
  padding-inline: 20px;
  border: 1px solid var(--color-bg-secondary);
  border-radius: 0.5rem;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
  scrollbar-color: transparent transparent;
  animation: bottom-to-top 0.25s ease-in-out forwards;
}

dialog::-webkit-scrollbar {
  width: 0;
  display: none;
}

dialog::-webkit-scrollbar-track {
  background: transparent;
}

dialog::-webkit-scrollbar-thumb {
  background-color: transparent;
}

@media (min-width: 650px) {
  dialog {
    max-width: 39rem;
  }
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

@keyframes bottom-to-top {
  0% {
    opacity: 0;
    transform: translateY(10%);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

dialog hr {
  margin-block: 1rem;
}

/* Tables */
table {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  border-spacing: 0;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  white-space: nowrap;
}

table td,
table th,
table tr {
  padding: 0.4rem 0.8rem;
  text-align: var(--justify-important);
}

table thead {
  background-color: var(--color-table);
  border-collapse: collapse;
  border-radius: var(--border-radius);
  color: var(--color-bg);
  margin: 0;
  padding: 0;
}

table thead tr:first-child th:first-child {
  border-top-left-radius: var(--border-radius);
}

table thead tr:first-child th:last-child {
  border-top-right-radius: var(--border-radius);
}

table thead th:first-child,
table tr td:first-child {
  text-align: var(--justify-normal);
}

table tr:nth-child(even) {
  background-color: var(--color-accent);
}

/* Quotes */
blockquote {
  display: block;
  font-size: x-large;
  line-height: var(--line-height);
  margin: 1rem auto;
  max-width: var(--width-card-medium);
  padding: 1.5rem 1rem;
  text-align: var(--justify-important);
}

blockquote footer {
  color: var(--color-text-secondary);
  display: block;
  font-size: small;
  line-height: var(--line-height);
  padding: 1.5rem 0;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scrollbar) transparent;
}

*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-scrollbar);
  border-radius: 10px;
}
/* Edit by JZNCTT */
#topbar {
  position: fixed;       /* Cố định topbar ở đầu trang */
  top: 0;               /* Căn phía trên */
  left: 0;
  width: 100%;
  background-color: transparent; /* Màu nền tuỳ chỉnh */
  color: #fff;            /* Màu chữ tuỳ chỉnh */
  padding: 16px;
  /*Hiệu ứng chuyển màu*/
  transition: background-color 0.3s ease-in-out;

  /* Đảm bảo topbar nằm trên các phần tử khác */
  z-index: 9999;
}

/* Khi thêm class .visible, đổi màu */
#topbar.visible {
  background-color: #333;
}

/* Class thêm vào */
.form-topbar{
  border: 0;
  background-color: rgb(41, 38, 38);
  height: 20px;
}

.btn-topbar {
  font-size: medium;
  background-color: transparent;
  width: 100px;
  border: none;
  border-radius: var(--border-radius);
  font-size: medium;
  margin-top: -5px;
  text-align: center;
  width: max-content;
  padding-left: 20px;
}

.link:hover{
  color: #007bff;
}

.link:active{
  color: #007bff;
  opacity: 0.8;
}
.btn-topbar:hover{
  transition: 0.3s;
  cursor: pointer;
  color: #007bff;
}
.btn-topbar:active{
  color: #007bff;
  opacity: 0.8;
}
.btn-topbar.seeing{
  transition: 0.3s;
  cursor: pointer;
  color: #007bff;
}

.topbar-container {
  display: flex;
  justify-content: flex-end; /* Sắp xếp các button từ bên phải */
  gap: 0.5rem; /* Tạo khoảng cách giữa các button (1rem = khoảng cách có thể thay đổi) */
  padding-right: 7rem;
}

/* Nếu trình duyệt không hỗ trợ thuộc tính gap trong flex, bạn có thể dùng margin */
.topbar-container button {
  margin-left: 10px;
}

/* Loại bỏ margin cho button đầu tiên nếu dùng margin */
.topbar-container button:first-child {
  margin-left: 0;
}

.content {
  width: 90%;           /* Độ rộng cố định cho phần nội dung */
  margin: 50px auto;      /* Căn giữa theo chiều ngang, cách trên dưới 20px */
  background-color: rgb(255, 255, 255); /* Nền trắng (có thể chỉnh thành màu hoặc độ trong suốt) */
  border: 2px solid #000; /* Đường viền cho phần nội dung */
  border-radius: 10px;
  padding: 20px;          /* Khoảng cách bên trong container */
  box-sizing: border-box;  /* Đảm bảo padding không làm tăng thêm độ rộng tổng */
  animation: fadeInUp 1.5s ease-in-out forwards;
}
.content.first{
  background: transparent;
  color: white;
  border: white solid 1px;
  animation: none;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title{
  border: white 2px;
  border-radius: 5px;
  float:right;
  padding-left: 20px;
}
/*Typing Word Effect*/
.typewriter h1 {
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .15em solid grey; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .10em; /* Adjust as needed */
  text-align: center;
  animation: 
    typing 3.5s steps(40, end),
    blink-caret .75s step-end infinite;
}

/* The typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: grey; }
}
/* About Me CSS */
.avatar{
  width: 300px;
  height: auto;
  border-radius: 50%;
  border: 3px solid black;
  padding: 5px;
  margin: 10px;
  transition: 0.5s;
}

.avatar:hover{
  padding: 10px;
  transition: 0.5s padding;
}

.icon {
  width: 30px;
  height: auto;
  margin-left: 0.5rem;
  margin-top: 30px;
}

.flextext{
  display: flex;
  width: max-content;
  padding-bottom: 5px;
}

.sameicon {
  width: auto;
  height: 100px;
  margin-left: 0.5rem;
  margin-top: 30px;
}
.icon:hover {
  opacity: 0.8;
}

.avt-container{
  text-align: center;
}

.info {
  display: flex;
  flex-direction: column; /* Xếp chữ theo cột */
}


.name:hover{
  color: #0097fc;
  cursor: default;
  transition: color 0.3s;
}

.name.job{
  color: #451eb7;
}

.name.job:hover{
  color: #920de9;
  transition: color 0.5s;
}

.parttitle{
  border-top: solid 3px grey;
  border-bottom: solid 3px #0097fc;
  font: bolder;
  width: max-content;
  margin: 0 auto;
  cursor: default;
}

.right{
  float: right;
}
/* Ability CSS */
.skillcontainer{
  background-color: rgba(128, 128, 128, 0.425);
  border-radius: 5px;
  width: 80%;
}
.skill{
  background-color: #0097fc;
  border-radius: 5px;
  display: flex;
  justify-content: right;
  color:white;
  width: 0%;
  transition: 2s width ease-in-out;
}

.div-center{
  display: flex;
  align-items: center;
  justify-content: center;
}
.ability-container {
  display: flex; /* Đặt các phần tử trong cùng một hàng */
  justify-content: space-between; /* Căn đều hai bên */
  align-items: center; /* Căn giữa theo chiều dọc */
  flex-wrap: wrap;
}
.ability-box {
  display: flex;
  flex-direction: column; /* Đặt nội dung xếp dọc */
  align-items: center; /* Căn giữa nội dung */
  text-align: center;
  width: 45%; /* Đảm bảo mỗi box chiếm một nửa hàng */
  height: auto;
}
.row {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 40px; /* Khoảng cách giữa các ô */
  margin-bottom: 50px; /* Khoảng cách giữa hai hàng */
}

/*Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid black;
  border-top: 5px solid #007BFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.contact-container{
  width: 100%;
  height: 20%;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px;
  color: white;
}

.detail{
  border-top: transparent;
  border-radius: 5px;
}

/* Experience CSS */
.exppoint{
  border-radius: 50%;
  width: 100px;
  height: 100px;
  border: solid 2px #d1d4d6;
  background-color: #31a1de;
}

.exppoint:hover{
  background-color: rgb(0, 183, 255);
  transition: 0.3s;
}

.textexp{
  color: white;
  font-size: 20px;
  cursor: default;
}

.desexp{
  padding-left: 30px;
  font-size: 16px;
}

.iconsize{
  font-size: 40px;
}

.dot-div{
  padding-top: 20px;
}
.dot{
  animation: bounce 1.5s infinite ease-in-out;
  font-size: 10px;
  padding: 5px;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
}