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

@font-face {
  font-family: 'BaseNeue'; /* Nama bebas */
  src: url('../font/BaseNeueTrial-CondensedBold.ttf') format('truetype'); /* Path ke font */
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-clr: hsl(0, 0%, 0%);
  --secondary-clr: hsl(0, 0%, 11%);
  --other-clr: hsl(0, 0%, 61%);
  --tag-clr: hsl(0, 0%, 55%);
  --accent-clr: hsl(160, 100%, 70%);
  --accent-other-clr: hsl(166, 100%, 80%);
  --main-clr: hsl(0, 0%, 95%);
  --section-mt: 8rem;
  --transition: cubic-bezier(0.25, 0.32, 0.85, 0.58);
  --transition-clr: color 300ms var(--transition);
  font-size: 10px;

  /* style for scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--other-clr) hsl(0, 0%, 73%);
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

/* style webkit browsers (chrome, edge) scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: hsl(0, 0%, 89%);
}

::-webkit-scrollbar-thumb {
  background-color: var(--other-clr);
}

::selection {
  background: var(--accent-clr);
  color: var(--primary-clr);
}

/* remove focus from all elements */
*:focus:not(:focus-visible) {
  outline: none;
}

/* adds focus style only on pressing tab key */
:focus-visible {
  outline: 2px dotted var(--accent-clr);
  outline-offset: 3px;
}

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

/* Set core root defaults */
@media screen and (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: 'Roboto Condensed', serif;
  font-size: clamp(1.4rem, 1vw, 1.6rem);
  line-height: 1.6;
  background: var(--primary-clr);
  color: var(--main-clr);
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

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

img,
picture {
  max-width: 100%;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
  all: unset;
}

ul li {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 800;
  font-family: 'BaseNeue';
}

.bounce-in-left {
  animation: bounce-in-left 1.1s both 0.3s;
}

.slide-in-top {
  animation: slide-in-top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.fade-in {
  animation: fade-in 1.2s cubic-bezier(0.39, 0.575, 0.565, 1) 0.5s both;
}

@keyframes bounce-in-left {
  0% {
    transform: translateX(-600px);
    animation-timing-function: ease-in;
    opacity: 0;
  }
  38% {
    transform: translateX(0);
    animation-timing-function: ease-out;
    opacity: 1;
  }
  55% {
    transform: translateX(-68px);
    animation-timing-function: ease-in;
  }
  72% {
    transform: translateX(0);
    animation-timing-function: ease-out;
  }
  81% {
    transform: translateX(-28px);
    animation-timing-function: ease-in;
  }
  90% {
    transform: translateX(0);
    animation-timing-function: ease-out;
  }
  95% {
    transform: translateX(-8px);
    animation-timing-function: ease-in;
  }
  100% {
    transform: translateX(0);
    animation-timing-function: ease-out;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slide-in-top {
  0% {
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 1rem;
}

.container .logo p {
  font-size: 2.5rem;
  font-weight: bold;
  font-family: 'BaseNeue';
}

.subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: clamp(1.2rem, 1vw, 1.35rem);
  color: var(--accent-clr);
}

.title {
  font-size: clamp(3.2rem, 3vw, 6rem);
}

.info {
  max-width: 500px;
  font-size: 1.35rem;
  padding-block-start: 1.3rem;
  color: var(--other-clr);
}

.btn {
  padding: 0.8rem 3rem;
  margin-block-start: 2rem;
  color: var(--main-clr);
  border-radius: 0.2rem;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

.hover-effect::after {
  position: absolute;
  content: '';
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent-clr);

  transform: scaleX(0);
  transform-origin: left;
  transition: all 300ms ease-in-out;
}

.hover-effect:hover::after {
  transform-origin: right;
  transform: scaleX(1);
}

small {
  color: var(--other-clr);
}

.nav {
  width: 100%;
  padding: 0 1rem;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  margin-block-start: 1.15rem;
  border-radius: 0.5rem;
  font-size: 1.4rem;
}

.nav-logo h3 {
  font-weight: 800;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.hero {
  padding: 0 1rem;
}

.hero .container {
  margin-block-start: var(--section-mt);
  display: grid;
  place-items: center;
  gap: 5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.hero-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.name {
  font-size: clamp(4rem, 5vw, 6rem);
}

.intro {
  color: var(--other-clr);
}

.hero img {
  max-width: 375px;
}

.hero .code {
  filter: drop-shadow(0 0 0.75rem var(--secondary-clr));
}

.hero-btn-container {
  margin-block-start: 5rem;
  display: flex;
  /* align-items: center; */
}

.hire-btn {
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  border: 1px solid var(--accent-clr);
  color: var(--accent-clr);
  transition: all 300ms cubic-bezier(0.25, 0.32, 0.85, 0.58);
  z-index: 1;
  position: relative;
  font-size: inherit;
  overflow: hidden;
}

.hire-btn::before {
  content: '';
  z-index: -1;
  position: absolute;
  top: 100%;
  right: 100%;
  width: 2rem;
  height: 1em;
  border-radius: 50%;
  background-color: var(--accent-clr);
  transform-origin: center;
  transform: translate3d(50%, -50%, 0) scale3d(0, 0, 0);
  transition: transform 0.45s ease-in-out;
}

.hire-btn:hover {
  cursor: pointer;
  color: hsl(0, 0%, 9%);
  border: 0;
}

.hire-btn:hover::before {
  transform: translate3d(50%, -50%, 0) scale3d(15, 15, 15);
}

.download-link {
  color: var(--other-clr);
  transition: color 0.45s ease-in-out;
}

.download-link:hover {
  color: #fff;
}

.download-link:focus {
  outline: none;
}

.footer {
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-copyright {
  font-size: 1.4rem;
  color: #b0bec5;
  margin-bottom: 1rem;
}

.footer-copyright a {
  color: #00bcd4;
  text-decoration: none;
}

.footer-copyright a:hover {
  text-decoration: underline;
}

/* responsiveness */
@media screen and (max-width: 50em) {
  body::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-clr);
    transform: translateY(-100%);
  }

  body.open::after {
    transition: transform 300ms ease-in-out;
    transform: translateY(0);
  }

  .skip-to-content {
    display: none;
  }

  .nav {
    position: relative;
    z-index: 1;
  }

  .nav-list {
    transition: opacity 300ms ease-in-out;
  }

  .nav-list {
    flex-direction: column;
    position: absolute;
    top: 250px;
    left: 50%;
    transform: translate(-50%);
    height: 100vh;
    opacity: 0;
    pointer-events: none;
  }

  .nav-list.open {
    opacity: 1;
    pointer-events: all;
  }

  .hero-btn-container {
    justify-content: center;
  }

  /* hamburger menu */
  .hamburger {
    width: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 330ms ease-out;
  }

  .hamburger.open {
    transform: rotate(-45deg);
  }

  .line-menu {
    background: hsl(0, 0%, 100%);
    width: 100%;
    height: 1.5px;
  }

  .line-menu:not(:first-child) {
    margin-block-start: 0.75rem;
  }

  .line-menu.half {
    width: 50%;
  }

  .line-menu.start {
    transition: transform 330ms cubic-bezier(0.54, -0.81, 0.57, 0.57);
    transform-origin: right;
  }

  .open .line-menu.start {
    transform: rotate(-90deg) translateX(3px);
  }

  .line-menu.end {
    align-self: flex-end;
    transition: transform 330ms cubic-bezier(0.54, -0.81, 0.57, 0.57);
    transform-origin: left;
  }

  .open .line-menu.end {
    transform: rotate(-90deg) translateX(-3px);
  }

  .hero .container {
    height: 60vh;
    text-align: center;
    position: relative;
  }

  .hero img {
    display: none;
  }

  .my-skills ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .project:nth-child(even) img {
    order: 1;
  }
  .project:nth-child(even) div {
    order: 2;
  }

  .other-projects {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .other-projects ul {
    justify-content: center;
  }

  .footer .container {
    justify-content: center;
    gap: 3rem;
  }

  .mail-link {
    justify-content: center;
  }
}
