/* General Reset and Styling */
*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  /*height: 100vh; !* Full viewport height *!*/
  text-align: center;
  /* Center text horizontally */
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  /* Use the body's text color */
}

/* Header */

header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  padding-top: 1.5vw;
  display: flex;
  justify-content: center;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0);
}

header ul {
  position: relative;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  background-color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  --blob-position: -120px;
}

/* Orange blob indicator */
header ul::before {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  border-radius: 25px;
  height: 40px;
  width: 80px;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
  transform: translateX(var(--blob-position));
  left: 50%;
  margin-left: -40px;
  /* Half of width to center the blob */
}

header ul li {
  margin: 0;
  position: relative;
  z-index: 1;
}

header ul li a {
  display: block;
  padding: 12px 20px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  border-radius: 25px;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

header ul li a:hover {
  color: white;
}

header ul li a.active {
  color: white;
}



/* Main Section */

.first-button {
  z-index: 3;
  width: 300px;
  height: 65px;
  position: relative;
  /* bottom: max(12.75vw, 5vw); */
  font-size: 20px !important;
  font-weight: bold;
}

#welcome {
  position: relative;
  margin: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  /*width: 100%;ova bese problemot so centriranje
    display:grid e problemot za los mobile izgled treba drug layout za mobile
    i slikata ke treba da se namali da se vidat dimenziite dali se e ok
    */
  /*display: grid;*/
  /*grid-template-columns: 1fr 1fr 1fr;*/
  /*grid-template-rows: 1fr 1fr 1fr;*/
  /*grid-template-areas:*/
  /*        "img-left main img-right"*/
  /*        "img-left main img-right"*/
  /*        "img-left main img-right";*/
}

.left-images {
  margin-left: -10vw;
  align-content: end;
  position: relative;
  left: min(3.5vw, 15vw);
  /*grid-area: img-left;*/
  /*position: relative;*/
  /*left: 350px;*/
  /*float: left;*/
}

.right-images {
  position: relative;
  right: min(3.5vw, 15vw);
  align-content: end;
  margin-right: -10vw;
  /*grid-area: img-right;*/
  /*position: relative;*/
  /*right: 350px;*/
}

.element-2 {
  position: relative;
  right: 5vw;
}

.element-5 {
  position: relative;
  left: 5vw;
}

.element-3 {
  width: 295px !important;
}

.element-6 {
  width: 275px !important;
}

.middle {

  position: relative;

}

@media (max-width: 890px) {
  .pfp-image {
    background-image: url("images/nick.png");
    border-radius: 17.5%;
    aspect-ratio: 1/1;
    width: 300px;
    background-size: cover;
    background-position-y: -65px !important;
  }

  .back-pfp-image {
    background-image: url("images/nick.png");
    border-radius: 17.5%;
    aspect-ratio: 1/1;
    width: 300px;
    background-size: cover;
    background-position-y: -80px;
  }

  #welcome {
    /*flex-direction: column;*/
    /*align-items: center;*/
    /*margin: 10px;*/
    margin-top: 10vh;
    /*margin-right: 505px !important;*/
  }

  .hover-images {
    max-width: 25vw !important;
    min-width: 10vh !important;
  }

  .left-images,
  .right-images {
    display: flex;
    margin-left: 0;
    margin-right: 0;
    position: static;
    align-content: center;
  }

  .left-images {
    margin-bottom: -25vw;
  }

  .right-images {
    margin-top: -10vw;
    right: 0 !important;
  }

  .element-2 {
    bottom: 5vw;
    left: 0;
    position: relative;
    text-align: center;
    margin-left: 12.5vw;
    margin-right: 12.5vw;
  }

  .element-5 {
    top: 5vw;
    left: 0;
    position: relative;
    text-align: center;
    margin-left: 12.5vw;
    margin-right: 12.5vw;
  }

  #welcome>div>span:first-child {
    font-size: 40px;
    top: 20px;
  }
}

@media (max-width: 460px) {

  header {
    padding-top: 7vw;
  }

  .right-images {
    position: absolute;
    top: 430px;
    left: 1px;
    margin-top: 0 !important;
  }

  .first-button {
    width: 200px !important;
    padding-bottom: 50px !important;
    bottom: 48.5vw !important;
  }

  .card {
    margin-top: 6vw;
  }

  .card__side--front {
    height: auto !important;
  }

  .card__side--back {
    height: auto !important;
  }

  #welcome>div>span:first-child {
    font-size: 40px !important;
    position: relative;
    top: 50px;
  }

  #welcome>div>span:first-child>span {
    font-family: "Gentium Book Basic", serif;
    font-size: 50px !important;
  }

  .card {
    width: 100% !important;
  }

  #projects {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr);
    padding: 2vw;
  }
}

@media (max-width: 385px) {
  /* .first-button {
     bottom: max(73.5vw, 90.5vw) !important; 
  } */

  .right-images {
    position: static !important;
  }

  .element-4 {
    position: relative !important;
    top: -165px !important;
  }

  .element-5 {
    top: -120px !important;
  }

  .element-6 {
    position: relative !important;
    top: -165px !important;
  }
}

#welcome>div>span:first-child {
  font-size: 60px;
  position: relative;
  top: 50px;
}

#welcome>div>span:first-child>span {
  font-family: "Gentium Book Basic", serif;
  font-size: 70px;
}

.compliments {
  top: 40px;
  font-family: "Arial", serif;
  font-size: 25px;
  color: gray;
  position: relative;
  /* Position relative to manage children */
  height: 50px;
  /* Set a height to contain the compliments */
  overflow: hidden;
  /* Hide overflowing content */
  display: flex;
  align-items: center;
  /* Center text vertically */
  justify-content: center;
  /* Center text horizontally */
}

.compliments span {
  position: absolute;
  width: 100%;
  opacity: 0;
  /* Start with zero opacity */
  animation: fade 15s infinite;
  /* Apply the fade animation */
}

.compliments span:nth-child(1) {
  animation-delay: 0s;
  /* First compliment starts immediately */
}

.compliments span:nth-child(2) {
  animation-delay: 3s;
  /* Second compliment starts after 3s */
}

.compliments span:nth-child(3) {
  animation-delay: 6s;
  /* Third compliment starts after 6s */
}

.compliments span:nth-child(4) {
  animation-delay: 9s;
  /* 4 compliment starts after 9s */
}

.compliments span:nth-child(5) {
  animation-delay: 12s;
  /* 5 compliment starts after12s */
}

@keyframes fade {

  0%,
  20% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  30%,
  100% {
    opacity: 0;
  }
}

/* Cards */

.cards {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 20px 0;
}

.card {
  width: 25em;
  /* Adjust based on your desired size */
  height: 25em;
  /* Adjust based on your desired size */
  position: relative;
  perspective: 1000px;
  /* Control the depth of the 3D effect */
}

.card__side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card__side--front,
.card__side--back {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card__side--back {
  transform: rotateY(180deg);
  /* Hide the back side initially */
}

.card__side img {
  width: 50%;
  /* Scale image to 50% of the card's width */
  height: auto;
  /* Maintain aspect ratio */
}

/* Card Hover Effect */
.card:hover .card__side--front {
  transform: rotateY(-180deg);
}

.card:hover .card__side--back {
  transform: rotateY(0deg);
}

.pfp-image {
  background-image: url("images/nick.png");
  border-radius: 17.5%;
  aspect-ratio: 1/1;
  width: 350px;
  background-size: cover;
  background-position-y: -80px;
}

.back-pfp-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("images/circle-with-text.PNG");
  background-color: rgba(255, 255, 255, 0.9);
  background-repeat: no-repeat;
  border-radius: 17.5%;
  aspect-ratio: 1/1;
  width: 350px;
  background-size: 200px 200px;
  background-position: center center;
}

/* Hover Images */
.hover-images {
  z-index: 1;
  /*width: 13vw;*/

  max-width: 13vw;
  min-width: 15vh;
  height: auto;
  overflow: hidden;
  transform: translateY(0px);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Projects Section */
#projects {
  padding: 20px;
  text-align: center;
}

#projects a {
  display: block;
  margin: 10px;
  color: #ecf0f1;
  text-decoration: none;
}

#projects a img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* About Section */
#about-me {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 150px;
}

#about-me>div:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 250px;
}

#about-me>div:first-child {
  margin-bottom: 100px;
  max-width: none !important;
  min-width: fit-content !important;
  height: 0px !important;
  position: sticky;
}

/*@media (max-width: 480px) {*/
/*    #about-me > div:first-child {*/
/*        margin: 0;*/
/*    }*/
/*}*/

.sticky-card.is-sticky {
  z-index: 3;
  position: sticky;
}

#about-me>strong:first-child {
  font-size: xxx-large;
  margin-bottom: 20px;
  z-index: -2;
}

#about-me>div>strong {
  font-size: xxx-large;
  margin-bottom: 20px;
  z-index: -2;
}

/* .about-me-card h2 {
    margin-top: 15px;
    font-size: xx-large;
}

.about-me-card p {
    margin-top: 20px;
} */

.about-me-card {
  background: rgba(102, 112, 255, 0.05);
  margin: 20px 0px 0px 0px;
  padding: 32px;
  border-radius: 48px;
  width: 100%;
  max-width: 950px;
  min-width: 250px;
  height: fit-content;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  font-size: larger;
  position: sticky;
  top: 25%;
  z-index: -2;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(102, 112, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: box-shadow 0.3s, transform 0.3s;
}

.about-me-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15), 0 12px 35px rgba(0, 0, 0, 0.12);
}

.card-content {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 32px;
  width: 100%;
  box-sizing: border-box;
  height: 100%;

  /* display: flex;
    align-items: center;
    justify-content: center; */
}

.card-text {
  font-family: "Public Sans", "Inter", -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #4d4d4d;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* Sticky card custom positions (manual, since SCSS is not processed) */
.sticky-card {
  position: sticky;
  transition: rotate 0.4s cubic-bezier(0.4, 2, 0.6, 1);
  z-index: 2;
}

#card-0 {
  top: 14%;
  rotate: 1deg;
  z-index: 1;
  /* About Me is behind others */
}

#card-1 {
  top: 22%;
  rotate: 2deg;
  z-index: 2;
}

#card-2 {
  top: 22%;
  rotate: -3deg;
  z-index: 3;
}

#card-3 {
  top: 22%;
  rotate: 4deg;
  z-index: 4;
}

.sticky-card.is-sticky {
  rotate: 0deg !important;
}

/*CV Button*/

button:not(.project-button, .blog-card__button) {
  padding: 17px 40px;
  cursor: pointer;
  border: 0;
  background-color: white;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 15px;
  transition: all 0.5s ease;
  border-radius: 26px;
  box-shadow: 35px 35px 68px 0px rgba(157, 177, 255, 0.2),
    inset -8px -8px 16px 0px rgba(157, 177, 255, 0.6),
    inset 0px 11px 28px 0px rgb(255, 255, 255);
}

button:hover:not(.project-button, .blog-card__button) {
  letter-spacing: 3px;
  background-color: hsl(261deg 80% 48%);
  color: hsl(0, 0%, 100%);
  box-shadow: rgb(93 24 220) 0px 7px 29px 0px;
}

button:active:not(.project-button, .blog-card__button) {
  letter-spacing: 3px;
  background-color: hsl(261deg 80% 48%);
  color: hsl(0, 0%, 100%);
  box-shadow: rgb(93 24 220) 0px 0px 0px 0px;
  transform: translateY(10px);
  transition: 100ms;
}


/*Past-Projects-Title*/

#Past-Projects-Title {
  font-size: xxx-large;
  margin-bottom: 20px;
  margin-top: 100px;
}

/*Past Projects card*/
:root {
  --font-family-primary: "Vollkorn", serif;
  --font-family-secondary: "PT Sans", sans-serif;

  --font-size-title: 32px;
  --line-height-title: 1.4;
  --font-size-caption: 14px;
  --line-height-caption: 1.2;

  --color-text: #222022;
  --color-highlight-primary: #ffef7e;
  --color-highlight-secondary: #b7f9e9;
  --border-radius-primary: 32px;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 576px) {
  :root {
    --font-size-title: 40px;
  }
}

.blog-card {
  max-width: 960px;
  border-radius: var(--border-radius-primary);
  box-shadow: 24px 24px 80px rgba(0, 0, 0, 0.1);
  padding: 20px 20px 28px 20px;
  box-sizing: border-box;
  margin: 20px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 576px) {
  .blog-card {
    flex-direction: row;
    align-items: center;
    margin: 40px;
    padding: 32px;
  }
}

.blog-card__image {
  width: 100%;
  max-height: 300px;
  border-radius: var(--border-radius-primary);
  object-fit: cover;
  margin-bottom: 18px;
}

@media (min-width: 576px) {
  .blog-card__image {
    width: 45%;
    max-height: none;
    min-height: 400px;
    margin-bottom: 0;
  }
}

@media (min-width: 576px) {
  .blog-card__content {
    width: 55%;
    padding-left: 40px;
  }
}

.blog-card__date {
  display: block;
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 6px;
}

@media (min-width: 576px) {
  .blog-card__date {
    margin-bottom: 8px;
  }
}

.blog-card__title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-title);
  line-height: var(--line-height-title);
  color: var(--color-text);
  box-decoration-break: clone;
  background-image: linear-gradient(90deg,
      var(--color-highlight-primary),
      var(--color-highlight-secondary));
  background-size: 100% 42%;
  background-repeat: no-repeat;
  background-position: 0 85%;
  padding: 0 4px;
  margin-left: -4px;
}

.blog-card__button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-highlight-primary);
  color: var(--color-text);
  border: none;
  border-radius: var(--border-radius-primary);
  padding: 12px 24px;
  font-family: var(--font-family-secondary);
  font-size: var(--font-size-caption);
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 20px;
}

@media (min-width: 576px) {
  .blog-card__button {
    margin-top: 0;
  }
}

.distance-blog-cards {
  /*margin-top: 350px;*/
  /*margin-bottom: 200px;*/
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#projects {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}



.grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.scroll-container {
  position: absolute;
  z-index: -1000;
  width: 100%;
  overflow: hidden;
  font-weight: bold;
  text-transform: uppercase;
  height: 100%;
  display: flex;
  align-items: center;
}

.scroll {
  position: relative;
  display: flex;
  width: 100%;
}

.scroll div {
  display: flex;
  white-space: nowrap;
  animation: scroll var(--time) linear infinite;
  animation-delay: calc(var(--time) * -1);
}

.scroll div:nth-child(2) {
  animation: scroll2 var(--time) linear infinite;
  animation-delay: calc(var(--time) / -2);
}

.scroll div span {
  display: inline-block;
  margin: 0 2rem;
  transition: 0.5s;
  font-size: calc(10vw + 7.5rem);
  font-weight: bold;
  z-index: -1000;
}

@keyframes scroll {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes scroll2 {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-200%);
  }
}

@keyframes move {
  from {
    transform: translateX(0%);
    /* Start from the right edge of the container */
  }

  to {
    transform: translateX(-100%);
    /* Move to the left edge of the container */
  }
}

@media (min-width: 890px) and (max-width: 1650px) {
  .scroll-container {
    margin-top: 5vw;
  }
}

/* From Uiverse.io by gustavofusco */
.pencil {
  display: block;
  width: 10em;
  height: 10em;
}

.pencil__body1,
.pencil__body2,
.pencil__body3,
.pencil__eraser,
.pencil__eraser-skew,
.pencil__point,
.pencil__rotate,
.pencil__stroke {
  animation-duration: 3s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.pencil__body1,
.pencil__body2,
.pencil__body3 {
  transform: rotate(-90deg);
}

.pencil__body1 {
  animation-name: pencilBody1;
}

.pencil__body2 {
  animation-name: pencilBody2;
}

.pencil__body3 {
  animation-name: pencilBody3;
}

.pencil__eraser {
  animation-name: pencilEraser;
  transform: rotate(-90deg) translate(49px, 0);
}

.pencil__eraser-skew {
  animation-name: pencilEraserSkew;
  animation-timing-function: ease-in-out;
}

.pencil__point {
  animation-name: pencilPoint;
  transform: rotate(-90deg) translate(49px, -30px);
}

.pencil__rotate {
  animation-name: pencilRotate;
}

.pencil__stroke {
  animation-name: pencilStroke;
  transform: translate(100px, 100px) rotate(-113deg);
}

/* Animations */
@keyframes pencilBody1 {

  from,
  to {
    stroke-dashoffset: 351.86;
    transform: rotate(-90deg);
  }

  50% {
    stroke-dashoffset: 150.8;
    /* 3/8 of diameter */
    transform: rotate(-225deg);
  }
}

@keyframes pencilBody2 {

  from,
  to {
    stroke-dashoffset: 406.84;
    transform: rotate(-90deg);
  }

  50% {
    stroke-dashoffset: 174.36;
    transform: rotate(-225deg);
  }
}

@keyframes pencilBody3 {

  from,
  to {
    stroke-dashoffset: 296.88;
    transform: rotate(-90deg);
  }

  50% {
    stroke-dashoffset: 127.23;
    transform: rotate(-225deg);
  }
}

@keyframes pencilEraser {

  from,
  to {
    transform: rotate(-45deg) translate(49px, 0);
  }

  50% {
    transform: rotate(0deg) translate(49px, 0);
  }
}

@keyframes pencilEraserSkew {

  from,
  32.5%,
  67.5%,
  to {
    transform: skewX(0);
  }

  35%,
  65% {
    transform: skewX(-4deg);
  }

  37.5%,
  62.5% {
    transform: skewX(8deg);
  }

  40%,
  45%,
  50%,
  55%,
  60% {
    transform: skewX(-15deg);
  }

  42.5%,
  47.5%,
  52.5%,
  57.5% {
    transform: skewX(15deg);
  }
}

@keyframes pencilPoint {

  from,
  to {
    transform: rotate(-90deg) translate(49px, -30px);
  }

  50% {
    transform: rotate(-225deg) translate(49px, -30px);
  }
}

@keyframes pencilRotate {
  from {
    transform: translate(100px, 100px) rotate(0);
  }

  to {
    transform: translate(100px, 100px) rotate(720deg);
  }
}

@keyframes pencilStroke {
  from {
    stroke-dashoffset: 439.82;
    transform: translate(100px, 100px) rotate(-113deg);
  }

  50% {
    stroke-dashoffset: 164.93;
    transform: translate(100px, 100px) rotate(-113deg);
  }

  75%,
  to {
    stroke-dashoffset: 439.82;
    transform: translate(100px, 100px) rotate(112deg);
  }
}

.arrow-down {
  display: block;
  max-width: 80%;
  height: auto;
  /* Remove transition to avoid conflict with animation */
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.arrow-down {
  animation: arrow-bounce 1.5s linear infinite;
}

@keyframes arrow-bounce {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(18px);
  }

  100% {
    transform: translateY(0);
  }
}

/* My Skills section */

/*my skills title */

#My-Skills-Title {
  font-size: xxx-large;
  margin-bottom: 20px;
  margin-top: 100px;
}

#my-skills {
  display: grid;
  flex: none;
  gap: 24px;
  grid-auto-rows: min-content;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  grid-template-rows: repeat(2, min-content);
  height: min-content;
  justify-content: center;
  max-width: 1200px;
  overflow: visible;
  padding: 0;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

/* Responsive breakpoints */
@media (max-width: 1000px) {
  #my-skills {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  #my-skills {
    grid-template-columns: 1fr;
  }
}

.flip-card {
  margin: 0 auto;
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 400px;
  min-height: 300px;
  aspect-ratio: 1;
  perspective: 1000px;
  transform: scale(0.8);
  opacity: 0.7;
  transition: transform 1.5s ease-out, opacity 1.5s ease-out;
}

.flip-card.visible {
  transform: scale(1);
  opacity: 1;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

/* Flip on click using a class */
.flip-card.flipped .flip-card-inner {
  transform: rotateX(-180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: rgba(102, 112, 255, 0.05);
  border-radius: clamp(24px, 5vw, 48px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(102, 112, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}

.flip-card-front {
  color: white;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.flip-card-back {
  color: white;
  transform: rotateX(180deg);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.flip-card-content {
  background: rgba(255, 255, 255, 0.85);
  border-radius: clamp(12px, 3vw, 24px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: clamp(16px, 4vw, 32px);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flip-card-front .flip-card-content {
  justify-content: center;
}

.flip-card-front .flip-card-content::after {
  content: 'click me';
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  opacity: 0.8;
}

.flip-card-back .flip-card-content {
  justify-content: flex-start;
  align-items: flex-start;
}

.flip-card-text {
  font-family: "Public Sans", "Inter", -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  color: #4d4d4d;
  text-align: start;
  line-height: 1.4;
  margin: 0;
  width: 100%;
}

/* Tool name styling (for the p tags with tool names on the FRONT only) */
.flip-card-front .flip-card-content p {
  font-family: "Public Sans", "Inter", -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: bold;
  margin: clamp(8px, 2vw, 16px) 0 0 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.click-me-text {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: bold;
  color: #666;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive font sizes for flip card tool names */
@media screen and (max-width: 768px) {
  .flip-card-front .flip-card-content p {
    font-size: clamp(0.7rem, 3vw, 1rem);
  }
}

@media screen and (max-width: 480px) {
  .flip-card-front .flip-card-content p {
    font-size: clamp(0.6rem, 3.5vw, 0.9rem);
  }
}

@media screen and (min-width: 1200px) {
  .flip-card-front .flip-card-content p {
    font-size: clamp(1rem, 2vw, 1.4rem);
  }
}

footer {
  margin-top: 400px;
  align-content: flex-start;
  align-items: flex-start;
  background-color: var(--token-988c7bc6-3659-40e0-9528-9fea659fdfb9, #fafafa);
  border-top-left-radius: 48px;
  border-top-right-radius: 48px;
  display: flex;
  flex: none;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  /* height: 100vh; */
  justify-content: center;
  order: 1002;
  overflow: visible;
  padding: 0 24px 0;
  position: relative;
  width: 100%;
  padding-top: 100px;
  padding-left: auto;
  padding-right: auto;
  padding-bottom: 10px;
}

#contact {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  flex: none;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px;
  height: fit-content;
  justify-content: center;
  overflow: visible;
  padding: 0;
  position: relative;
  width: 100%;
}

@media screen and (max-width: 900px) {
  #contact {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  #contact>div {
    width: 100% !important;
    max-width: 300px !important;
    height: fit-content !important;
    gap: 8px !important;
    overflow: visible !important;
    text-align: left !important;
  }

  #contact>div>span {
    margin-bottom: 5px !important;
  }
}

#contact>div {
  align-content: flex-start;
  align-items: center;
  display: flex;
  flex: 1 0 0px;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 24px;
  height: min-content;
  justify-content: center;
  max-width: 1200px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 1px;
}


/* Styles for footer divs that contain a span */
footer div:has(span) {
  --font-family-primary: "Vollkorn", serif;
  --font-family-secondary: "PT Sans", sans-serif;
  --line-height-title: 1.4;
  --font-size-caption: 14px;
  --line-height-caption: 1.2;
  --color-text: #222022;
  --color-highlight-primary: #ffef7e;
  --color-highlight-secondary: #b7f9e9;
  --border-radius-primary: 32px;
  --font-size-title: 40px;
  font-family: "Open Sans", sans-serif;
  text-align: center;
  --scroll: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  font-size: 24px;
  font-weight: 700;
  color: black;
  margin-bottom: 25px;
}

/* Styles for all elements inside footer divs except spans */
footer div *:not(span) {
  --token-22ce634a-3bca-44b4-a2f7-9723690faaf5: rgb(102, 255, 217);
  --token-6f90ab0b-9c06-473d-9152-fd7240d55b02: rgb(0, 204, 153);
  --token-63e45272-007b-437e-b2a8-9f4d1433e3e9: rgb(102, 112, 255);
  --token-71847330-551e-46c6-930c-59c8982f4c98: rgb(249, 71, 6);
  --token-6bef2831-d541-489a-82bb-da4e27db4e2c: rgb(255, 255, 255);
  --token-988c7bc6-3659-40e0-9528-9fea659fdfb9: rgb(250, 250, 250);
  --token-755abc58-3adf-4e31-933f-db4718cdad56: rgb(242, 242, 242);
  --token-db07816e-4c38-4cf6-8a53-54351a21e6a2: rgb(179, 179, 179);
  --token-4903af81-113e-4b7e-a0b8-adcbf47e878d: rgb(128, 128, 128);
  --token-d1efab36-84ca-4c47-98a0-f9f61fd3586c: rgb(77, 77, 77);
  --token-1dfb5f8e-6d59-4a6a-bbc6-917bc568117f: rgb(0, 0, 0);
  --site-will-change-override: none;
  --site-aspect-ratio-supported: auto;
  cursor: pointer;
  white-space: pre;
  --extracted-tcooor: var(--token-d1efab36-84ca-4c47-98a0-f9f61fd3586c, rgb(77, 77, 77));
  --site-link-text-color: rgb(0, 153, 255);
  --site-link-text-decoration: underline;
  box-sizing: border-box;
  -webkit-font-smoothing: inherit;
  /* margin: 0px; */
  font-family: var(--site-blockquote-font-family, var(--site-font-family, Inter, Inter Placeholder, sans-serif));
  font-style: var(--site-blockquote-font-style, var(--site-font-style, normal));
  font-weight: var(--site-blockquote-font-weight, var(--site-font-weight, 400));
  color: var(--site-blockquote-text-color, var(--site-text-color, #000));
  font-size: calc(var(--site-blockquote-font-size, var(--site-font-size, 16px)) * var(--site-font-size-scale, 1));
  letter-spacing: var(--site-blockquote-letter-spacing, var(--site-letter-spacing, 0));
  text-transform: var(--site-blockquote-text-transform, var(--site-text-transform, none));
  text-decoration-line: var(--site-blockquote-text-decoration, var(--site-text-decoration, initial));
  text-decoration-style: var(--site-blockquote-text-decoration-style, var(--site-text-decoration-style, initial));
  text-decoration-color: var(--site-blockquote-text-decoration-color, var(--site-text-decoration-color, initial));
  text-decoration-thickness: var(--site-blockquote-text-decoration-thickness, var(--site-text-decoration-thickness, initial));
  text-decoration-skip-ink: var(--site-blockquote-text-decoration-skip-ink, var(--site-text-decoration-skip-ink, initial));
  text-underline-offset: var(--site-blockquote-text-decoration-offset, var(--site-text-decoration-offset, initial));
  line-height: var(--site-blockquote-line-height, var(--site-line-height, 1.2em));
  text-align: var(--site-blockquote-text-alignment, var(--site-text-alignment, start));
  -webkit-text-stroke-width: var(--site-text-stroke-width, initial);
  -webkit-text-stroke-color: var(--site-text-stroke-color, initial);
  font-feature-settings: var(--site-font-open-type-features, initial);
  font-variation-settings: var(--site-font-variation-axes, normal);
  text-wrap: var(--site-text-wrap-override, var(--site-text-wrap));
  background-color: var(--site-blockquote-text-background-color, var(--site-text-background-color, initial));
  border-radius: var(--site-blockquote-text-background-radius, var(--site-text-background-radius, initial));
  /* padding: var(--site-blockquote-text-background-padding, var(--site-text-background-padding, initial)); */
  --site-font-family: "Inter", sans-serif;
  --site-font-family-bold: "Inter", "Inter Placeholder", sans-serif;
  --site-font-family-bold-italic: "Inter", "Inter Placeholder", sans-serif;
  --site-font-family-italic: "Inter", "Inter Placeholder", sans-serif;
  --site-font-size: 24px;
  --site-font-style: normal;
  --site-font-style-bold: normal;
  --site-font-style-bold-italic: italic;
  --site-font-style-italic: italic;
  --site-font-weight: 400;
  --site-font-weight-bold: 700;
  --site-font-weight-bold-italic: 700;
  --site-font-weight-italic: 400;
  --site-letter-spacing: 0em;
  --site-line-height: 2em;
  --site-paragraph-spacing: 20px;
  --site-text-alignment: start;
  --site-text-color: var(--token-d1efab36-84ca-4c47-98a0-f9f61fd3586c, #4d4d4d);
  --site-text-decoration: none;
  --site-text-transform: none;
}

/* Override text alignment for mobile devices */
@media screen and (max-width: 900px) {
  footer div *:not(span) {
    text-align: center !important;
    --site-text-alignment: center !important;
  }
}

:root {
  --button-white: rgb(255, 255, 255);
  --button-black: rgb(0, 0, 0);
  --button-text-color: rgb(0, 0, 0);
  --button-primary: rgba(102, 112, 255, 0.1);
  --button-primary-hover: rgba(102, 112, 255, 0.15);
  --button-focus: rgba(102, 112, 255, 0.5);
}

/* Reset for button (optional - include if needed) */
.button-container * {
  box-sizing: border-box;
}

/* Container */
.button-container {
  display: inline-block;
  opacity: 1;
}

/* Main Button Link */
.animated-button {
  backdrop-filter: blur(5px);
  background-color: var(--button-primary);
  border-radius: 96px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: none;
  transform-origin: 50% 50% 0px;
  opacity: 1;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  padding: 6px;
  transition: all 0.3s ease;
}

/* Inner Button Container */
.button-inner {
  background-color: var(--button-white);
  border-radius: clamp(32px, 8vw, 48px);
  transform: none;
  transform-origin: 50% 50% 0px;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 3vw, 12px) clamp(16px, 5vw, 24px);
  gap: 0px;
  width: auto;
  transition: all 0.6s ease;
  overflow: hidden;
  position: relative;
}

/* Text Container */
.button-text-container {
  outline: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-shrink: 0;
  transform: none;
  transform-origin: 50% 50% 0px;
  opacity: 1;
}

/* Button Text */
.button-text {
  font-family: "Public Sans", "Public Sans Placeholder", sans-serif;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
  line-height: 1.4em;
  color: var(--button-text-color);
  margin: 0;
}

/* Icon Container */
.button-icon {
  background-color: var(--button-black);
  border-radius: 66.6667%;
  transform: translateX(80px) rotate(0deg);
  transform-origin: 50% 50% 0px;
  opacity: 1;
  width: clamp(32px, 8vw, 48px);
  height: clamp(32px, 8vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: clamp(8px, 3vw, 12px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon SVG Container */
.button-icon-svg {
  transform: none;
  transform-origin: 50% 50% 0px;
  opacity: 1;
  width: clamp(16px, 4vw, 24px);
  height: clamp(16px, 4vw, 24px);
}

/* SVG Styles */
.button-icon-svg svg {
  user-select: none;
  width: 100%;
  height: 100%;
  display: inline-block;
  fill: var(--button-white);
  color: var(--button-white);
  flex-shrink: 0;
}

/* SVG Group */
.button-icon-svg svg g {
  color: var(--button-white);
}

/* Hover Effects */
.animated-button:hover {
  background-color: var(--button-primary-hover);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.animated-button:hover .button-inner {
  gap: 12px;
  justify-content: space-between;
  padding: 12px 72px 12px 24px;
  min-width: 280px;
  transition: all 0.6s ease;
}

.animated-button:hover .button-icon {
  transform: translateX(0px) rotate(360deg);
  opacity: 1;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus State */
.animated-button:focus {
  outline: 2px solid var(--button-focus);
  outline-offset: 4px;
}

/* Fix for shorter text buttons - ensures smooth animation */
.cv-button .button-inner {
  min-width: 300px;
  /* Make the button wider */
  height: 70px;
  /* Make the button taller */
  padding: 20px 48px;
  font-size: 2rem;
  border-radius: 56px;
}

.cv-button:hover .button-inner {
  min-width: 360px;
  /* Expanded width for bigger button */
  height: 70px;
  /* Keep same height to avoid jumping */
  padding: 20px 90px 20px 48px;
  /* Adjust padding for icon space */
  gap: 16px;
  justify-content: space-between;
}

/* Make the text and icon bigger for the CV button */
.cv-button .button-text {
  font-size: 2.2rem;
}

.cv-button .button-icon {
  width: 56px;
  height: 56px;
  right: 20px;
  /* Adjust position for larger button */
  transform: translateX(100px) rotate(0deg);
  /* Start further out for bigger button */
}

.cv-button:hover .button-icon {
  transform: translateX(0px) rotate(360deg);
  opacity: 1;
}

.cv-button .button-icon-svg {
  width: 32px;
  height: 32px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

  /* Disable hover effects on mobile */
  .animated-button:hover {
    background-color: var(--button-primary);
    transform: none;
  }

  .animated-button:hover .button-inner {
    gap: 0px;
    justify-content: center;
    padding: clamp(8px, 3vw, 12px) clamp(16px, 5vw, 24px);
    min-width: auto;
  }

  .animated-button:hover .button-icon {
    transform: translateX(80px) rotate(0deg);
    opacity: 1;
  }

  /* Show icon on mobile by default or hide it completely */
  .button-icon {
    display: none;
    /* Hide icon on mobile for simplicity */
  }

  /* Make button more touch-friendly */
  .animated-button {
    min-height: 44px;
    /* iOS recommended touch target */
    border-radius: clamp(64px, 12vw, 96px);
    padding: clamp(4px, 2vw, 6px);
  }

  .button-inner {
    min-height: 36px;
  }
}

@media (max-width: 480px) {

  /* Extra small screens */
  .button-text {
    font-size: clamp(14px, 4.5vw, 18px);
  }

  .button-inner {
    padding: clamp(6px, 2.5vw, 10px) clamp(12px, 4vw, 20px);
  }

  .animated-button {
    border-radius: clamp(48px, 10vw, 80px);
  }

  .button-inner {
    border-radius: clamp(24px, 6vw, 40px);
  }
}

/* Touch device detection - disable hover effects */
@media (hover: none) and (pointer: coarse) {
  .animated-button:hover {
    background-color: var(--button-primary);
    transform: none;
  }

  .animated-button:hover .button-inner {
    gap: 0px;
    justify-content: center;
    padding: clamp(8px, 3vw, 12px) clamp(16px, 5vw, 24px);
    min-width: auto;
  }

  .animated-button:hover .button-icon {
    transform: translateX(80px) rotate(0deg);
    opacity: 1;
  }

  /* Add active state for touch feedback */
  .animated-button:active {
    background-color: var(--button-primary-hover);
    transform: scale(0.98);
    transition: all 0.1s ease;
  }
}

/* Hide first button on small screens (460px and below) */
@media screen and (max-width: 460px) {
  #welcome .button-container {
    position: relative !important;
    bottom: 35vw !important;
  }
}