@font-face {
  font-family: 'Quicksand';
  src: url('./assets/fonts/Quicksand.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

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

:root {
  scrollbar-color: #787f86 #fefeff;
}
:root.dark {
  scrollbar-color: #707780 #1c222a;
}

:root.window-out-of-focus {
  scrollbar-color: #b1b5b8 #fefeff;
}
:root.window-out-of-focus.dark {
  scrollbar-color: #4c535d #1c222a;
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Quicksand', sans-serif;
  color: #1e2837;
}

main,
footer,
div#hero {
  padding: 1em;
  max-width: 1154px;
  margin: 0 auto;
}

.hidden {
  opacity: 0;
  transform: scale(0.95);
}

#nav-menu.hidden {
  pointer-events: none;
}

#nav-menu {
  pointer-events: auto;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

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

p {
  max-width: 700px;
  line-height: 1.5;
}

ul,
h1,
h2,
h3,
h4,
p {
  padding: 0;
  margin: 0;
}

p b {
  font-weight: 600;
}

li {
  list-style: none;
}

.divider {
  background-color: #ebebeb;
  padding: 1px 0;
  margin: 4em 0;
}

body,
nav {
  background-color: #fefeff;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 0 3px #c9c9c9;
  padding: 0.5em;
  z-index: 9;
}

#nav-menu {
  position: fixed;
  top: 70px;
  background-color: #fff;
  padding: 0.5em 0;
  box-shadow: 0 0 3px #c9c9c9;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 0.5em;
  z-index: 10;
  transform-origin: center;
}

#nav-menu li a {
  display: block;
  padding: 0.5em 5em 0.5em 0.5em;
  margin: 0 0.5em;
  border-radius: 10px;
  cursor: pointer;
}

#nav-menu li a:hover {
  background-color: #f2f2f2;
}

#nav-menu li a:active {
  background-color: #2a3441;
  color: #dee0de;
}

nav #btn-nav-menu,
nav #btn-theme {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: none;
}

nav #btn-home {
  padding: 0.6em;
  border-radius: 10px;
}

nav svg {
  width: 24px;
  position: relative;
  top: 2px;
}

nav #btn-home {
  font-weight: 700;
  font-size: 1.25rem;
  background: none;
  border: none;
}

#hero {
  padding-top: 7em;
  text-align: center;
}

#hero #avatar-container {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 295px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  margin-top: 6em;
  transform: translateX(-15px);
}

#hero #avatar-container .eye {
  width: 6%;
  height: 7%;
  position: absolute;
  top: 22%;
  left: 47%;
  border-radius: 50%;
  background-color: #000014;
  opacity: 0;
}
#hero #avatar-container .eye.right {
  top: 21.8%;
  left: 66%;
}

#hero #avatar {
  height: 100%;
}

#hero h1 {
  font-size: 1.875rem;
  margin-top: 0.5em;
}

#hero h2 {
  font-size: 3.75rem;
  margin-top: 0.3em;
}

#hero #stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 1.125rem;
  gap: 1em 2em;
  margin: 1.5em auto;
  width: 35em;
}

#hero #stats .stat p {
  padding: 0;
  margin: 0;
}

#stats svg,
section svg {
  width: 24px;
  position: relative;
  top: 5px;
}

#years-in-tech-container {
  position: relative;
}
#years-in-tech-container #info-icon {
  font-family: serif;
  position: absolute;
  margin-left: .3em;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}
.tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: rgba(18, 19, 20, 0.85);
  color: #fff;
  text-align: center;
  font-size: .8rem;
  padding: 6px;
  border-radius: 4px;
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  user-select: none;
}
#info-icon:hover + .tooltip-text,
.tooltip-text.active {
  visibility: visible;
  opacity: 1;
}

section svg {
  top: 4px;
}

#cta {
  display: flex;
  justify-content: center;
  gap: 1em;
}

#cta #btn-email,
#cta #btn-cv {
  margin: 0;
}

#cta a,
#projects button {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1.2em 1.5em;
  border: none;
  border-radius: 8px;
  margin-top: 1em;
  margin-right: 0.5em;
  margin-left: 0.5em;
  background-color: #f2f2f2;
}

#cta {
  margin-top: 3em;
}

#cta a.blue-btn {
  background-color: #126cad;
  color: white;
}

#cta svg {
  width: 16px;
  margin-left: 0.3em;
  position: relative;
  top: 2px;
}

#projects button {
  font-size: 0.9rem;
}

section h3 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1em;
}

section p {
  margin: 1.25rem 0;
}

section p.date {
  font-size: 0.875rem;
  margin: 0.5em 0;
}

section h4 {
  font-size: 1.125rem;
}

section h4 a {
  font-size: 1rem;
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
}

#education #education-container,
#experience #experience-container {
  border-left: 1px solid #1e2837;
  padding-left: 1.2em;
  padding-top: 1px;
  position: relative;
}

#education #education-container.dark,
#experience #experience-container.dark {
  border-left: 1px solid #a7adba;
}

#education .education-item:not(:first-child),
#experience .experience-item:not(:first-child) {
  margin-top: 2em;
}

#education #education-container .date,
#experience #experience-container .date {
  position: relative;
}

#education #education-container .date::before,
#experience #experience-container .date::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #1e2837;
  border-radius: 50%;
  left: -1.4em;
  top: 50%;
  transform: translate(-50%, -50%);
}

#education #education-container .date.dark::before,
#experience #experience-container .date.dark::before {
  background-color: #a7adba;
}

#certificates .certificates-container,
#tools .tools-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  isolation: isolate;
  position: relative;
}

#certificates a {
  background-color: #f2f2f2;
  padding: 0.4em 1em;
  border-radius: 20px;
}

#projects #projects-container {
  display: grid;
  grid-template: repeat(2, 1fr) / repeat(3, 1fr);
  gap: 1em;
}

#projects .project {
  display: flex;
  flex-direction: column;
  background-color: #f2f2f2;
  padding: 2em;
  border-radius: 10px;
  position: relative;
}

#projects .project .links {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
}

#projects .project .links a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#projects .project .links a svg {
  position: relative;
  top: 1px;
}

#languages #languages-container {
  display: flex;
  justify-content: center;
  gap: 1em;
}

#languages .language {
  background-color: #f2f2f2;
  padding: 2em;
  margin: 1em 0;
  border-radius: 10px;
  width: 50%;
  position: relative;
  overflow: hidden;
}

#languages .language h4,
#languages .language p {
  position: relative;
  z-index: 2;
}

#languages .language p {
  margin: 0.5em 0;
}

#tools .tool {
  background-color: #f2f2f2;
  padding: 0.4em 1em;
  border-radius: 20px;
  cursor: default;
}

.tools-sub, 
.cert-sub {
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 1em;
}

.tools-container, 
.certificates-container {
  margin-bottom: 2em;
}

#contact #btn-chat {
  font-size: 3.75rem;
  font-weight: 700;
  display: block;
  margin: 1em auto;
  border: none;
  background: none;
  color: #126cad;
  text-align: center;
}
body.dark #contact #btn-chat {
  color: #168EE3;
}

#contact #socials {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-bottom: 2em;
}

#contact #socials .social-btn {
  padding: 0.5em 1em;
  border-radius: 10px;
}

#contact button {
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  background: none;
  cursor: pointer;
}

#contact svg {
  width: 64px;
  position: relative;
  top: 10px;
}

footer {
  font-size: 0.875rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer p {
  margin-top: .5em;
}

footer svg {
  width: 12px;
  position: relative;
  top: 2px;
}

.dot {
  display: inline-block;
  position: relative;
  top: 1px;
  width: 13px;
  height: 13px;
  margin-right: 0.5em;
  border: none;
  border-radius: 50%;
  background-color: #3f3f3f;
}
.js {
  background-color: #fed438;
}
.ts {
  background-color: #0178ce;
}
.html {
  background-color: #ff6c1f;
}
.css {
  background-color: #009ce1;
}
.react {
  background-color: #01d9fc;
}
.node {
  background-color: #85ba65;
}
.vite {
  background-color: #646dfe;
}
.npm {
  background-color: #c12026;
}
.git {
  background-color: #f14f33;
}
.git {
  background-color: #f14f33;
}
.mysql {
  background-color: #4579a0;
}
.postgresql {
  background-color: #336791;
}
.mongodb {
  background-color: #4db33d;
}
.cloudflare {
  background-color: #ff6633;
}
.wordpress {
  background-color: #013d56;
}
.firebase {
  background-color: #1a73e8;
}
.netlify {
  background-color: #31c8c8;
}
.vscode {
  background-color: #0067b9;
}
.bootstrap {
  background-color: #7952b3;
}
.slack {
  background-color: #611f69;
}
.jira {
  background-color: #0053cd;
}
.jasmine {
  background-color: #85417c;
}
.jquery {
  background-color: #79cef5;
}
.sass {
  background-color: #c06b92;
}
.langchain {
  background-color: #2ecc71;
}
.openai {
  background-color: #1a7e65;
}
.w3c {
  background-color: #005b9c;
}
.supabase {
  background-color: #3ece8f;
}
.bash {
  background-color: #4eaa25;
}
.d3 {
  background-color: #f5864a;
}
.unity {
  background-color: #222c37;
}
.rest {
  background-color: #f0673a;
}
.express {
  background-color: #404d59;
}
.pwa {
  background-color: #5a0fc8;
}
.unit {
  background-color: #29a745;
}
.ai {
  background-color: #007bfc;
}
.tech {
  background-color: #ff9800;
}
.be {
  background-color: #4caf91;
}
.responsive {
  background-color: #4caf50;
}
.swift {
  background-color: #f05138;
}
.python {
  background-color: #3776ab;
}
.clean {
  background-color: #9c27b0;
}
.tailwind {
  background-color: #00bdfe;
}
.jenkins {
  background-color: #D24939;
}
.confluence {
  background-color: #0052CC;
}
.photoshop {
  background-color: #31A8FF;
}
.premiere {
  background-color: #EA77FF;
}

body.dark,
nav.dark,
#nav-menu.dark {
  background-color: #1d222b;
  color: #a7adba;
}
#nav-menu.dark {
  box-shadow: 0 0 3px #1b1b1b;
}
#nav-menu li .nav-a.dark:hover {
  background-color: #393e47;
}
#projects .project.dark,
#languages .language.dark,
#certificates .certificate.dark,
#tools .tool.dark,
#cta a.dark {
  background-color: #181e25;
}
nav.dark {
  box-shadow: 0 0 3px #1b1b1b;
}
.divider.dark {
  background-color: #2a3139;
}

.btn:active {
  transform: scale(0.95);
  translate: 0px;
  transform-origin: center;
}

#projects .links a:active {
  transform: scale(0.95);
  translate: 0px;
  transform-origin: center;
}

.bub {
  position: relative;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout;
  will-change: transform;
  flex-basis: auto;
  z-index: 1;
}
#certificates a {
  cursor: pointer;
  will-change: transform;
}

.bub:hover,
#certificates a:hover {
  position: relative;
  transform: scale3d(1.1, 1.1, 1);
  transform-origin: center;
  translate: none;
  z-index: 2;
}

nav #btn-theme {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e2837;
}

nav #btn-theme::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
}

nav #btn-theme.light::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%231e2837'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z'%3E%3C/path%3E%3C/svg%3E");
}

nav #btn-theme.dark::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23a7adba'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z'%3E%3C/path%3E%3C/svg%3E");
}

nav #btn-theme.light {
  color: #1e2837;
}

nav #btn-theme.dark {
  color: #a7adba;
}

nav #btn-theme:hover {
  background-color: #d3d4d6;
}

nav #btn-theme.dark:hover {
  background-color: #393e47;
}

.tooltip-text.dark {
  background-color: rgba(255, 255, 255, 0.85);
  color: #000000;
}

.rotate-animation,
.rotate-animation-reverse {
  will-change: opacity, transform;
}

@media (hover: hover) {
  nav #btn-nav-menu:hover,
  nav #btn-theme:hover,
  nav #btn-home:hover,
  #contact #socials .social-btn:hover,
  #projects .links a:hover {
    background-color: #d3d4d6;
  }
  #cta a:hover {
    background-color: #d3d3d2;
  }
  #cta a.blue-btn:hover {
    background-color: #0e5e95;
  }
  nav #btn-nav-menu.dark:hover,
  nav #btn-theme.dark:hover,
  nav #btn-home.dark:hover,
  #contact #socials .social-btn.dark:hover,
  #projects .links a.dark:hover {
    background-color: #393e47;
  }
  #cta a.dark:hover {
    background-color: #15181e;
  }
}

@media (hover: none) {
  .btn:hover,
  #cta a:hover,
  #contact #socials .social-btn:hover,
  #projects .links a:hover {
      background-color: inherit !important;
      color: inherit !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .no-transition * {
    transition: none !important;
  }

  html {
    scroll-behavior: smooth;
  }

  .tooltip-text {
    transition: opacity 0.2s;
  }

  #cta a {
    animation: ctaWiggle 0.3s ease-out both;
  }

  .btn,
  .project,
  .language,
  .bub,
  #certificates a,
  #projects a {
    transition: transform 0.1s ease-in-out, background-color 0.2s ease-out,
      font-weight 0.2s ease-out;
  }

  #nav-menu {
    transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out;
  }
  
  #nav-menu li a,
  #projects .project .links .code:hover .outline {
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .rotate-animation,
  .rotate-animation-reverse {
    animation: fadein 0.3s ease-in-out;
  }

  .rotate-animation-reverse {
    animation: fadein-reverse 0.3s ease-in-out;
  }

  #languages .language:first-child::before,
  #languages .language:nth-child(2)::before {
    position: absolute;
    font-size: 15.5rem;
    color: #f8f8f8;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease-out;
  }
  
  #languages .language:first-child::before {
    content: "אבגדה";
    transform: translate(-15%, -49%);
  }
  
  #languages .language:nth-child(2)::before {
    content: "abcde";
    transform: translate(-6%, -49%);
    font-weight: 500;
  }
  
  #languages .language:first-child:hover::before,
  #languages .language:nth-child(2):hover::before {
    opacity: 1;
    will-change: opacity, transform;
  }
  
  #languages .language.dark:first-child::before,
  #languages .language.dark:nth-child(2)::before {
    color: #1c212c;
  }

  #languages .language:first-child.active::before,
  #languages .language:nth-child(2).active::before {
    opacity: 1;
  }

  #languages .language:first-child::before,
  #languages .language:nth-child(2)::before {
    opacity: 0;
    transition: opacity 0.3s ease-out;
  }

  #hero #avatar-container .eye {
    transition: transform 0.1s ease;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: rotate(0deg) translateZ(0);
  }
  to {
    opacity: 1;
    transform: rotate(45deg) translateZ(0);
  }
}

@keyframes fadein-reverse {
  from {
    opacity: 0;
    transform: rotate(45deg) translateZ(0);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) translateZ(0);
  }
}

@keyframes ctaWiggle {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 885px) {
  #projects #projects-container {
    grid-template: repeat(2, 1fr) / repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  #hero #avatar-container {
    transform: scale(.9);
    left: -10px;
  }
  h1#hi {
    margin-top: 0;
  }
  div#hero {
    padding-top: .1em;
  }
}

@media (max-width: 670px) {
  #hero #stats {
    width: 100%;
  }
}

@media (max-width: 600px) {
  #projects #projects-container {
    grid-template: repeat(1, 1fr) / repeat(1, 1fr);
  }
  .divider {
    padding: 1px 0;
    margin: 3em 0;
  }
}

@media (max-width: 550px) {
  #hero #stats {
    width: 80%;
  }
}

@media (max-width: 500px) {
  #contact #btn-chat {
    font-size: 2.75rem;
  }
  #languages #languages-container {
    flex-direction: column;
    align-items: center;
  }
  #languages .language {
    padding: 2em;
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 460px) {
  #hero #stats {
    width: 100%;
  }
}

@media (max-width: 405px) {
  #cta {
    flex-direction: column;
    align-items: center;
  }
  #cta a,
  #cta button {
    width: 100%;
  }
  #hero #stats .stat {
    width: 100%;
  }
}