@font-face {
  font-family: "Source Code Pro";
  src: url("./SourceCodePro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --color-bg: #fffff8;
  --color-txt: #262625;
  --color-2nd: #757575;
  -webkit-text-size-adjust: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f0e10;
    --color-txt: #b4b4b4;
    --color-2nd: #757575;
  }
}

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

html,
body {
  font-family: "Source Code Pro", monospace;
  font-weight: 400;
  background-color: var(--color-bg);
  color: var(--color-txt);
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  overflow: hidden;
}

.wrapper {
  overflow-x: hidden;
  width: 100%;
  min-height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.wrapper.no-scroll {
  overflow: hidden;
}

header,
main,
footer {
  max-width: 1250px;
  margin: 0 auto;
  width: 100%;
}

header {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 100;
  background-color: var(--color-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease;
}

header.hide {
  transform: translateY(-100%);
}

.logo h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 400;
}

nav {
  display: flex;
  align-items: center;
  font-size: 1.1em;
  gap: 30px;
}

header a {
  text-decoration: none;
  color: var(--color-txt);
}

.link,
.socials {
  display: flex;
  gap: 15px;
}

.socials {
  margin-top: 5px;
}

header a:hover {
  text-decoration: underline;
  color: var(--color-2nd);
}

.social-icon {
  width: 16.5px;
  height: 16.5px;
  fill: currentColor;
}

.social-icon.farcaster-icon {
  width: 20px;
  height: 20px;
}

.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 200;
}

.bar {
  width: 100%;
  height: 2px;
  border-radius: 5px;
  background-color: var(--color-txt);
  position: absolute;
  transition:
    transform 0.3s ease,
    top 0.3s ease,
    bottom 0.3s ease;
}

.bar:first-child {
  top: 20%;
}

.bar:last-child {
  bottom: 20%;
}

.burger-menu.active .bar:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.burger-menu.active .bar:last-child {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

main {
  flex: 1;
}

.portfolio-wrapper {
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.port-intro {
  max-width: 400px;
  margin-bottom: 50px;
}

.port-intro p {
  color: var(--color-2nd);
  margin: 0;
  line-height: 1.5;
}

.card-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 25px;
  max-width: 100%;
  margin: 0 auto 50px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card img {
  width: 100%;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.01);
}

.title {
  margin: 2.5px;
  font-size: 1.1em;
}

.description {
  color: var(--color-2nd);
  margin: 2.5px;
  font-size: 0.9em;
}

.about-wrapper {
  display: flex;
  align-items: center;
  min-height: calc(100dvh - 200px);
  padding: 25px;
}

.about-intro {
  max-width: 800px;
  margin: 0 auto;
}

.about-intro p {
  color: var(--color-2nd);
  margin-top: 0;
  line-height: 1.5;
}

.about-intro p span {
  color: var(--color-txt);
}

footer {
  display: flex;
  justify-content: end;
  align-items: center;
  padding: 20px 25px;
}

footer p {
  color: var(--color-2nd);
  font-size: 0.8em;
  margin: 0;
}

@media (max-width: 600px) {
  .burger-menu {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100dvh;
    font-size: 1.4em;
    background-color: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  nav.active {
    opacity: 1;
    pointer-events: auto;
  }

  .link {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .socials {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    justify-content: center;
    gap: 30px;
  }

  .social-icon {
    width: 21.5px;
    height: 21.5px;
  }

  .social-icon.farcaster-icon {
    width: 25px;
    height: 25px;
  }

  nav a:hover {
    text-decoration: none;
    color: var(--color-txt);
  }
}
