:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  /* palette HSL */
  --bg-dark: hsl(0, 0%, 0%);
  --bg: hsl(0, 0%, 10%);
  --bg-light: hsl(0, 0%, 20%);
  --text: hsl(0, 0%, 100%);
  --text-muted: hsl(0, 0%, 75%);

  --red: #cd1414;
  --orange: #e96229;
  --blue: #3497cf;
  --yellow: hsl(50, 100%, 50%);

  --step--2: clamp(0.6944rem, 0.6856rem + 0.0444vw, 0.72rem);
  --step--1: clamp(0.8333rem, 0.8101rem + 0.1159vw, 0.9rem);
  --step-0: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1283rem + 0.3587vw, 1.4063rem);
  --step-2: clamp(1.44rem, 1.3295rem + 0.5527vw, 1.7578rem);
  --step-3: clamp(1.728rem, 1.5648rem + 0.8161vw, 2.1973rem);
  --step-4: clamp(2.0736rem, 1.8395rem + 1.1704vw, 2.7466rem);
  --step-5: clamp(2.4883rem, 2.1597rem + 1.6433vw, 3.4332rem);

  scroll-behavior: smooth;
}

#profile {
  border-radius: 8px;
}

/* reset css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* border: 1px solid blue; */
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
}

h1 {
  font-size: var(--step-5);
}

h2 {
  font-size: var(--step-2);
}

h3 {
  font-size: var(--step-0);
}

a,
a:visited,
a:active {
  color: inherit;
  text-decoration: none;
}

a:hover:not(.nav-link, .card) {
  text-decoration: underline;
}

p,
li {
  line-height: 24px;
  font-weight: 500;
}

ul {
  padding-left: 1rem;
}

/* sidebar */
.sidebar {
  display: flex;
  position: fixed;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: hsla(0, 0%, 0%, 50%);
}

.sidebar-container {
  right: 0;
  top: 0;
  position: absolute;
  width: 240px;
  height: 100vh;
  background-color: var(--bg);
}

.sidebar-button {
  padding: 0.6em 1em;
  float: right;
}

.sidebar-menu {
  padding: 1em;
  display: flex;
  flex-direction: column;
}

hr {
  clear: both;
}

.sidebar-menu > a {
  text-align: right;
}

/* container */
.nav-container,
.main-container,
.footer-container {
  max-width: 1080px;
  margin: 0 auto;
}

/* button & toggle */
.button-toggle {
  padding: 0.8em;
  background-color: var(--bg);
  color: inherit;
  border-radius: 8px;
  border: 1px solid var(--bg-light);
  cursor: pointer;
}

/* navbar */
.nav {
  border-bottom: 2px solid var(--bg-light);
  position: fixed;
  width: 100%;
  top: 0;
  background-color: var(--bg);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  padding: 1.2em;
  font-weight: bold;
}

.nav-title:hover {
  text-decoration: underline;
}

.nav-menu {
  display: none;
  margin: 0 1em;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  height: fit-content;
  position: relative;
  width: fit-content;
  padding: 0;
  flex-grow: 1;
  gap: 1em;
}

.nav-menu-mobile {
  display: none;
  position: absolute;
  padding: 0.5em 1em;
  top: 0;
  right: 0;
  gap: 1em;
  align-items: flex-end;
  flex-direction: column;
  width: 50%;
  height: 100vh;
  background-color: var(--bg-dark);
  /* transition: 5s; */
}

.nav-menu-mobile > a.nav-link {
  text-align: end;
  width: 100%;
}

.nav-link {
  padding: 0.8em;
  border-radius: 8px;
  color: inherit;
  font-weight: 500;
}

.nav-link:hover {
  background-color: var(--bg-light);
}

.nav-button {
  margin: 0 1em;
}

.main-container {
  padding: 0 1em;
}

.section {
  padding: 4em 0 2em 0;
}

#home {
  display: flex;
  height: 75vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section-header {
  margin: 1.2em 0;
}

.section-button {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.image {
  display: block;
  margin: 1em auto;
  max-width: 300px;
  width: 100%;
}

/* button Styling */
.btn {
  padding: 0.75em 1em;
  color: inherit;
  background-color: var(--bg);
  border: 1px solid var(--bg-light);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 11pt;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover,
.btn > svg > path {
  border: 1px solid var(--yellow);
  color: var(--yellow);
  text-decoration: none !important;
}

/* Card Styling */
.card {
  border: 2px solid var(--bg-light);
  display: inline-block;
  border-radius: 8px;
  cursor: pointer;
  background-color: var(--bg);
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overflow: hidden;
}

.card:hover {
  border: 2px solid var(--yellow);
}

.card-img {
  background-color: gray;
  background-size: auto;
  max-width: 450px;
  width: 100%;
  background-color: var(--bg);
  pointer-events: none;
}

.card-title {
  text-align: center;
  padding: 0.5em;
}

/* text Styling */
.text-link {
  color: var(--yellow) !important;
}

#html {
  color: var(--orange);
}

#css {
  color: var(--blue);
}

#js {
  color: var(--yellow);
}

/* footer Styling */
.footer {
  border-top: 2px solid var(--bg-light);
}

.footer-container {
  padding: 1em;
}

.footer-description {
  text-align: center;
}

.grid {
  margin: 1em 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 1em;
}

.scroll-disable {
  overflow-y: hidden;
}

.sidebar {
  display: none;
}

.open {
  display: block;
}

@media screen and (min-width: 720px) {
  #home {
    align-items: flex-start;
  }

  .nav {
    background-color: transparent;
  }

  .nav-menu {
    display: flex;
  }

  .button-toggle {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .image {
    float: right;
    margin: 0 1em;
  }

  .card-img {
    max-width: 300px;
  }
}
