* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Work Sans', sans-serif;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Work Sans', sans-serif;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  margin-top: 80px !important;
  background-color: transparent;
}

body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: #9f9f9f;
}

.hero {
  margin-top: 80px;
  height: calc(100vh - 80px); 
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
  font-family: 'Chewy', sans-serif;
  scroll-margin-top: 80px;
}

.hero .left-side {
    width: 50%;
    padding: 0 100px;
    position: relative;
    display: flex;
    justify-content: space-around;
}

.hero .left-side .left-side-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: fit-content;
}

.hero .welcome {
    font-size: 108px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5%;
    line-height: 1;
}

.hero .name {
    font-size: 68px;
    font-weight: 500;
    text-align: center;  
    letter-spacing: 0.5%;
}

.hero-bg-svg {
    position: absolute;
    top: -30px; 
    left: 0;
    width: 100vw;
    height: 260px;
    z-index: -1;
    transition: all 0.3s ease;
    background-image: url("img/heading_background.png"), url("img/heading_background.png");
    background-size: auto 260px;
    background-repeat: repeat, repeat;
    background-position: 0 0, 40px 0px;
}

.hero .role {
    font-size: 58px;
    font-weight: 500;
    color:#4849E8;
    margin-top: 50px;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5%;
}

.role-container {
  position: relative;
  padding: 8px;
  width: fit-content;
}

.wavy-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: -1;
}

.hero .skills {
    color:#4849E8;
    padding: 0;
    margin: 32px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.hero .skills li {
    font-family: 'Work sans',sans-serif;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    list-style-position: inside;
}

.hero .left-side .description {
    width: fit-content;
    font-family: 'Work sans',sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #7D9FEF;
    font-weight: 600;
    width: 100%;
}

.hero .left-side .description .second {
    display: block;
    color: #4849E8; 
    font-weight: 700;
    text-align: left;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn {
    text-align: center;
    padding: 12px 28px;
    font-size: 16px;
    font-family: 'Work Sans', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 46px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: scale(0.95);
    box-shadow: none;
}

.contact-button {
    background: #fff;
    color: #4849E8;
    border: 2px solid #4849E8;
}

.aboutme-button {
    background: #4849E8;
    color: #FFFFFF;
    border: none;
}

.hero .right-side {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: end;
}

.hero .right-side .hero-illustration-large {
  height: 100%;
}

.hero .right-side .hero-illustration-small {
  display: none;
}

.about-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px 120px;
  scroll-margin-top: 60px;
  background: #DDF344;
}

.about-section::before {
  content: "";
  background: url('img/aboutme_image_background.svg');
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto 100%;
  width: 50%;
  left: 0;
}

.about-container {
  min-height: 760px;
  position: relative;
  display: flex;
  width: 100%;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
}

.about-img {
  margin-top: auto;
}

.about-img img {
  margin-left: 10%;
  flex: 1;
  max-width: 55%;
  object-fit: cover;
}

.about-text {
  backdrop-filter: blur(6px);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 560px;
  min-height: 540px;
  background: rgba(139,175,80,0.50);
}

.aboutme-heading-container {
  position: relative;
  padding: 0 8px;
  margin-bottom: 16px;
  width: fit-content;
}

.aboutme {
  font-size: 68px;
  font-weight: 500;
  color: #fff;
  font-family: 'Chewy', sans-serif;
  text-shadow: 4px 4px 8px rgba(0,0,0,0.2);
  -webkit-text-stroke: 1.5px #8BAF50;
}

.wavy-line-aboutme {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 18px;
  z-index: 1;
}


.about-text p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 16px;
  font-weight: 600;
  color: #FDFDFD;
  text-shadow: 4px 4px 8px rgba(0,0,0,0.25);
  text-align: justify;
}

.corner-img {
  position: absolute;
  top: -40px;
  left: -40px;
  transform: scaleX(-1);
}

.about-skills {
  width: 100%;
  bottom: -6%;
  border-radius: 20px;
  position: absolute;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(154,199,80,0.40);
  backdrop-filter: blur(30px);
  padding: 0 60px;
}

.about-skill {
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  transition: 0.3s ease;
  margin: 0 auto;
  height: 114px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
}

.about-skill:hover {
  transform: translateY(-5px);
}

.about-skill img {
  height: 44px;
  width: 80px;
}

.about-skill p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.references {
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-margin-top: 80px;
}

.references svg-bg {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.references-heading-container {
  position: relative;
  width: fit-content;
  padding: 8px;
  margin-bottom: 40px;
  z-index: 2;
}

.references-heading {
  position: relative;
  display: inline-block;
  font-size: 58px;
  color: #7D9FEF;
  font-family: 'Chewy', sans-serif;
  text-shadow: 4px 4px 8px rgba(0,0,0,0.2);
  -webkit-text-stroke: 0.1px #4849E8;
}

.wavy-line-project {
  position: absolute;
  bottom: 8%;
  left: 0;
  z-index: -1;
  width: 100%;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.reference-card {
  background: #7D9FEF;
  border-radius: 12px;
  padding: 30px 20px 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
  z-index: 2;
  min-height: 362px;
  max-width: 290px;
}


.reference-card::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -4px;
  border: 4px solid #4849E8;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.reference-card:hover {
  transform: translateY(-8px);
  cursor: pointer;
}

.reference-card:hover::after {
  opacity: 1;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.reference-card .img-container {
  height: 160px;
}

.reference-card img {
  width: 240px;
  max-width: 100%;
  margin-bottom: 15px;
}

.reference-card h3 {
  font-size: 18px;
  color: #4849E8;
  margin: 15px 0 20px;
}

.reference-card p {
  font-size: 16px;
  font-weight: 600;
  color: #FDFDFD;
  padding: 0 10px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  text-align: justify;
}

.reference-card a {
  display: inline-block;
  text-decoration: none;
  background: #4849E8;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-top: auto;
}

.reference-card a:hover {
  background: #2a2999;
}

@media (max-width: 1600px) {
  .hero .welcome {
    font-size: 80px;
  }

  .hero .name {
    font-size: 50px;
  }

  .hero-bg-svg {
    height: 200px;
    background-size: auto 200px;
    background-repeat: repeat, repeat;
    background-position: 0 0, 40px 0px;
  }

  .hero .left-side {
    padding: 0 60px;
  }

  .hero .right-side {
    margin-top: auto;
    height: 97%;

  }
}

@media (max-width: 1400px) {
  @media (min-height: 900px) {
    .hero {
      flex-direction: column;
      align-items: center;
      height: unset;
      padding-top: 80px;
      gap: 40px;
      width: 100%;
    }

    .hero .right-side .hero-illustration-large {
      display: none;
    }

    .hero .right-side .hero-illustration-small {
      display: block;
      width: 100%;
    }

    .hero-bg-svg {
      top: 120px;
      height: 220px;
      background-size: auto 220px;
    }

    .hero .left-side {
      position: unset;
      width: unset;
      padding: 0 12px;
    }
  }
}

@media (max-width: 1240px) {
  .hero {
    flex-direction: column;
    align-items: center;
    height: unset;
    padding-top: 80px;
    gap: 40px;
    width: 100%;
  }

  .hero .right-side .hero-illustration-large {
    display: none;
  }

  .hero .right-side .hero-illustration-small {
    display: block;
    width: 100%;
  }

  .hero-bg-svg {
    top: 120px;
    height: 220px;
    background-size: auto 220px;
  }

  .hero .left-side {
    position: unset;
    width: unset;
    padding: 0 12px;
  }

  .about-container {
    flex-direction: column;
  }

  .about-img {
    display: flex;
    justify-content: space-around;
    order: 2;
  }

  .about-text {
    order: 1;
  }

  .about-skills {
    order: 3;
    bottom: -2%;
    padding: 0 18px;
  }
  
  .about-section::before {
    content: "";
    background: url('img/aboutme_image_background.svg');
    top: 40%;
    left: -40px;
    height: 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 100%;
    width: 100%;
    height: 60%;
    box-shadow: inset 0 20px 20px 0px #DDF344;
  }

  .reference-grid {
    display: grid;
    grid-template-columns: repeat( 1fr, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .reference-grid > :nth-child(4) {
    grid-column: 2 / 3;
  }

  .references-heading-container {
    position: relative;
    width: fit-content;
    padding: 8px;
    margin-bottom: 40px;
    z-index: 2;
  }

  .references {
    padding: 30px 20px;
  }

  .references-heading {
    font-size: 58px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    -webkit-text-stroke: 0.1px #4849E8;
  }
}

@media (max-width: 992px) {
  .hero {
    padding-top: 30px;
    gap: 30px;
  }
  .hero-bg-svg {
    top: 80px;
    height: 180px;
    background-size: auto 180px;
  }

  .hero .welcome {
    font-size: 60px;
  }

  .hero .name {

    font-size: 40px;
  }
  
  .hero .role {
    font-size: 36px;
  }

  .role-container {
    position: relative;
    padding: 8px;
  }

  
  .wavy-line {
    bottom: 10px;
  }

  .wavy-line-aboutme {
    bottom: -10px;
  }

  .hero .skills {
    margin: 18px 0;
  }
  
  .btn {
    width: 100%;
  }

  .hero .skills li {
    background: #4849E8;
    border-radius: 6px;
    list-style: none;
    color: #fff;
    margin: 8px;
  }
  
  .hero .right-side {
    display: block;
    width: 80%;
  }

  .hero .left-side .description {
    text-align: center;
  }

  .hero .left-side .description .second {
    text-align: center;
  }

  .about-skills {
    margin-top: -8%;
    position: relative;
    padding: 0 18px;
  }

  .about-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #DDF344;
  }

  .about-text {
    margin-bottom: 40px;
  }

  .about-container {
    gap: unset;
    justify-content: unset;
  }

  .corner-img {
    position: absolute;
    top: -28px;
    left: -28px;
    transform: scaleX(-1);
    zoom: 0.5;
  }
  
  .about-section::before {
    content: "";
    background: url('img/aboutme_image_background.svg');
    top: 50%;
    left: -40px;
    height: 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 100%;
    width: calc(100% + 40px);
    height: 50%;
    box-shadow: inset 0 20px 20px 0px #DDF344;
  }

  .aboutme {
    font-size: 40px;
    -webkit-text-stroke: 1.5px #8BAF50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  }

  .about-text p {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .hero-buttons {
    flex-wrap: wrap;
  }
  
  .reference-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    padding: 0;
  }

  .reference-card {
    max-width: unset;
    width: 100%;
  }

  .language-switch {
    margin: 0 auto;
  }
  
  .toggle-label {
    width: 90px;
    height: 36px;
  }
  
  .toggle-switch {
    width: 30px;
    height: 30px;
  }
  
  .toggle-checkbox:checked + .toggle-label .toggle-switch {
    transform: translateX(54px);
  }
  
  .toggle-hu, .toggle-en {
    font-size: 12px;
  }
  
  .toggle-label img {
    width: 16px;
  }

  .references-heading {
    font-size: 40px;
  }
}

[data-lang-key] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-change {
    opacity: 0;
    transform: translateY(10px);
}

.lang-change-active {
    opacity: 1;
    transform: translateY(0);
}