@import "https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600&display=swap";

/* src/index.css */
:root {
  --menu-border: #908caa59;
  --menu-border-hover: #b4637a;
  --menu-bg: #fffaf3;
  --menu-bg-hover: #f4ede8;
  --menu-focus-ring: #c4a7e78c;
  --background: #faf4ed;
  --text: #575279;
}

[data-theme="dark"] {
  --menu-border: #908caa73;
  --menu-border-hover: #ebbcba;
  --menu-bg: #1f1d2ed9;
  --menu-bg-hover: #26233a;
  --menu-focus-ring: #ebbcba80;
  --background: #1f1d2e;
  --text: #e0def4;
}

html, body {
  height: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  margin: 0;
  font-family: Public Sans, Neue Haas Grotesk, sans-serif;
}

.app {
  display: flex;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  transition: color .25s, background-color .25s;
}

.content {
  display: flex;
  flex-direction: row;
  align-items:  center;
  width: 90%;
  max-width: 1280px;
  min-height: 70vh;
}

.left {
  position: relative;
  display: flex;
  pointer-events: none;
  flex-direction: column;
  flex-basis: 25%;
  align-items:  flex-start;
  gap: 1rem;
  padding-bottom: 3rem;
  padding-left: 5rem;
}

.left:before {
  content: "";
  display: flex;
  position: absolute;
  border-bottom: var(--menu-border-hover) solid 10px;
  border-left: var(--menu-border-hover) solid 10px;
  border-radius: 5%;
  width: 5rem;
  height: 5rem;
  bottom: 0;
  left: 0;
}

.right {
  display: flex;
  position: relative;
  overflow: visible;
  pointer-events: none;
  flex-basis: 75%;
  justify-content: center;
  align-items:  center;
}

.pixelblast {
  position: absolute;
  z-index: 0;
  color: red;
  top: 0;
  left: 0;
}

.right:before {
  content: "";
  display: flex;
  position: absolute;
  border-top: var(--menu-border-hover) solid 10px;
  border-left: var(--menu-border-hover) solid 10px;
  z-index: 1;
  background: none;
  border-radius: 5%;
  width: 125px;
  height: 125px;
  top: -100px;
  left: 0;
}

.right:after {
  content: "";
  display: flex;
  position: absolute;
  border-bottom: var(--menu-border-hover) solid 10px;
  border-right: var(--menu-border-hover) solid 10px;
  z-index: 1;
  background: none;
  border-radius: 5%;
  width: 125px;
  height: 125px;
  bottom: -100px;
  right: 0;
}

.view_transition {
  display: flex;
  animation: fade-slide .35s ease both;
  justify-content: center;
  align-items:  center;
  width: 100%;
  height: 100%;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu_item {
  backdrop-filter: blur(10px);
  cursor: pointer;
  color: var(--text);
  text-align: left;
  opacity: .65;
  pointer-events: all;
  background: none;
  border: 0;
  border-radius: 100px;
  padding: .75rem 1.5rem;
  transition: transform .2s, background .2s, border-color .2s;
  font-size: 1.5rem;
  font-weight: 600;
}

.menu_item:hover {
  border-color: var(--menu-border-hover);
  opacity: 1;
  transform: translateX(8px);
}

.menu_item:focus-visible {
  box-shadow: 0 0 0 3px var(--menu-focus-ring);
}

.menu_item--active {
  opacity: 1;
  border-bottom: 1px solid var(--menu-border-hover);
  transform: translateX(12px);
}

.darkmode_toggle {
  position: fixed;
  background: var(--menu-bg);
  display: inline-flex;
  overflow: hidden;
  border-radius: 999px;
  justify-content: center;
  align-items:  center;
  width: 3rem;
  height: 3rem;
  top: 1.5rem;
  left: 1.5rem;
}

.darkmode_icon {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items:  center;
  width: 100%;
  height: 100%;
}

.darkmode_icon__glyph {
  position: absolute;
  opacity: 0;
  color: var(--text);
  fill: currentColor;
  width: 1.5rem;
  height: 1.5rem;
  transition: opacity .3s, transform .3s;
  transform: translateY(10px)rotate(-8deg);
}

.darkmode_icon__glyph path {
  stroke: currentColor;
  stroke-width: 1.5;
}

.darkmode_icon__glyph--visible {
  opacity: 1;
  transform: translateY(0)rotate(0);
}

.darkmode_icon__glyph--moon {
  transform-origin: 60% 40%;
}

.darkmode_icon__glyph--sun {
  transform-origin: 50% 50%;
}

.language_toggle {
  position: fixed;
  background: var(--menu-bg);
  color: var(--text);
  border-radius: 999px;
  padding: .5rem .9rem;
  transition: transform .2s, background .2s, border-color .2s;
  font-size: .9rem;
  font-weight: 600;
  top: 1.5rem;
  right: 5.25rem;
}

.about {
  display: flex;
  width: 100%;
  max-width: 720px;
  min-height: 250px;
  padding: 2rem 2.5rem;
}

.about_section {
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
}

.about_title {
  margin: 0 0 .75rem;
  font-size: 2rem;
  font-weight: 700;
}

.about_text {
  opacity: .9;
  font-size: 1rem;
  line-height: 1.6;
}

.contact_container {
  display: flex;
  pointer-events: all;
  width: 100%;
  max-width: 720px;
  min-height: 250px;
  padding: 2rem 2.5rem;
}

.contact_element {
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  display: flex;
  border-radius: 1rem;
  flex-direction: column;
  gap: 1rem;
  min-height: 260px;
  padding: 1.5rem 1.75rem;
}

.contact_list {
  align-self:  flex-end;
  margin-top: auto;
}

.contact_list ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items:  flex-end;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.contact_list li {
  margin: 0;
}

.contact_list .contact_reference {
  display: flex;
  border: 1px solid var(--menu-border);
  color: var(--text-primary);
  background: #ffffff14;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 3rem;
  height: 3rem;
  transition: transform .2s, background .2s;
  font-size: 1.5rem;
}

.contact_list .contact_reference:hover {
  background: #ffffff29;
  transform: translateY(-2px);
}

.project_card {
  display: flex;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 1rem;
  flex-direction: column;
  gap: .5rem;
  width: min(600px, 88%);
  height: auto;
  min-height: 300px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  box-shadow: 0 6px 24px #00000014;
}

.project_card, .project_card * {
  -webkit-user-select: text;
  user-select: text;
}

.project_card h2 {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.project_card p {
  opacity: .9;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.projects {
  display: flex;
  justify-content: center;
  align-items:  center;
  width: 100%;
}

.projects .splide {
  pointer-events: all;
  width: 100%;
}

@media (width <= 960px) {
  .content {
    width: 100%;
    padding: 0 1.5rem;
  }

  .left {
    padding-left: 2.5rem;
  }

  .project_card {
    width: min(540px, 94%);
    padding: 1.5rem 1.75rem;
  }

  .darkmode_toggle {
    left: 1rem;
  }

  .language_toggle {
    right: 1rem;
  }
}

@media (width <= 900px) {
  .project_card {
    width: min(400px, 94%);
  }
}

@media (width <= 720px) {
  .right:before {
    top: -25px;
  }

  .right:after {
    bottom: -30px;
  }

  .left:before {
    border: none;
  }

  .app {
    align-items:  flex-start;
  }

  .content {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding-top: 2rem;
  }

  .left {
    text-align: center;
    flex-basis: auto;
    align-items:  center;
    gap: .75rem;
    width: 100%;
    margin-bottom: 5rem;
    padding: 0 1rem;
  }

  .menu_item, .menu_item--active {
    text-align: center;
    display: inline-flex;
    position: relative;
    border-bottom: none;
    justify-content: center;
    width: min(320px, 100%);
    margin: .15rem auto;
    transform: translateY(0);
  }

  .menu_item {
    transition: transform .2s;
  }

  .menu_item:hover {
    transform: translateY(-4px);
  }

  .menu_item--active {
    transform: translateY(-6px);
  }

  .menu_item:after, .menu_item--active:after {
    content: "";
    position: absolute;
    background: var(--menu-border);
    border-radius: 999px;
    width: 40%;
    height: 2px;
    transition: width .2s, background .2s;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .menu_item:hover:after {
    background: var(--menu-border-hover);
    width: 60%;
  }

  .menu_item--active:after {
    background: var(--menu-border-hover);
    width: 65%;
  }

  .right {
    flex-basis: auto;
    width: 100%;
  }

  .about, .project_card {
    width: 80%;
    padding: 1.5rem;
  }

  .darkmode_toggle, .language_toggle {
    position: absolute;
  }
}

@media (width <= 480px) {
  .content {
    padding: 5rem 1rem 2rem;
  }

  .left {
    padding: 0;
  }

  .project_card {
    gap: .35rem;
    padding: 1.25rem 1.5rem;
  }

  .menu_item {
    padding: .5rem 1rem;
    font-size: .95rem;
  }

  .about_title {
    font-size: 1.5rem;
  }

  .about_text, .project_card p {
    font-size: .95rem;
  }
}

.name_svg {
  width: 250px;
}

.name_svg > * {
  stroke: var(--text);
  fill: var(--background);
  stroke-width: 1.5;
  stroke-linecap: round;
}

@keyframes line-animation {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill {
  to {
    fill: var(--text);
  }
}

.name_svg path:first-child {
  stroke-dasharray: 582;
  stroke-dashoffset: 582;
  animation: line-animation 2s ease forwards 3s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(2) {
  stroke-dasharray: 736;
  stroke-dashoffset: 736;
  animation: line-animation 2s ease forwards 2.7s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(3) {
  stroke-dasharray: 343;
  stroke-dashoffset: 343;
  animation: line-animation 2s ease forwards 2.4s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(4) {
  stroke-dasharray: 685;
  stroke-dashoffset: 685;
  animation: line-animation 2s ease forwards 2.1s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(5) {
  stroke-dasharray: 488;
  stroke-dashoffset: 488;
  animation: line-animation 2s ease forwards 1.8s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(6) {
  stroke-dasharray: 702;
  stroke-dashoffset: 702;
  animation: line-animation 2s ease forwards 1.5s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(7) {
  stroke-dasharray: 685;
  stroke-dashoffset: 685;
  animation: line-animation 2s ease forwards 1.2s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(8) {
  stroke-dasharray: 345;
  stroke-dashoffset: 345;
  animation: line-animation 2s ease forwards .9s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(9) {
  stroke-dasharray: 578;
  stroke-dashoffset: 578;
  animation: line-animation 2s ease forwards .6s, fill .5s ease forwards 3.3s;
}

.name_svg path:nth-child(10) {
  stroke-dasharray: 472;
  stroke-dashoffset: 472;
  animation: line-animation 2s ease forwards .3s, fill .5s ease forwards 3.3s;
}
