/* ------------------- Imports ------------------- */
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');


/* ------------------- Variables ------------------- */
:root {
  --li4-color-primary-hsl: 250, 84%, 54%;
  --li4-color-bg-hsl: 0, 0%, 100%;
  --li4-color-contrast-high-hsl: 230, 7%, 23%;
  --li4-color-contrast-higher-hsl: 230, 13%, 9%;
  --li4-color-bg-light-hsl: 0, 0%, 100%;
  --li4-color-white-hsl: 0, 0%, 100%;
  --li4-color-bg-dark-hsl: 240, 4%, 95%;
  --li4-color-bg-lighter-hsl: 0, 0%, 100%;
  --li4-color-black-hsl: 230, 13%, 9%;

  --li4-space-3xs: 0.25rem;
  --li4-space-2xs: 0.375rem;
  --li4-space-xs: 0.5rem;
  --li4-space-sm: 0.75rem;
}

@media(min-width: 64rem){
  :root {
    --li4-space-3xs: 0.375rem;
    --li4-space-2xs: 0.5625rem;
    --li4-space-xs: 0.75rem;
    --li4-space-sm: 1.125rem;
  }
}


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

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}


/* ------------------- Typography ------------------- */
body {
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1rem;
  background-color: hsl(0, 0%, 100%);
  position: relative;
  z-index: 0;
}


html {
    scroll-behavior: auto !important;
    overflow-x: hidden;
    height: auto;
}

body {
    overflow-anchor: none;
    min-height: 100vh;
    height: auto;
    position: static;
    overflow-y: visible;
    display: block;
}

#main-content {
    position: relative;
    overflow: visible;
    height: auto;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 { font-size: 2.0736rem; }
h2 { font-size: 1.728rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.2rem; }

@media (min-width: 64rem) {
  body { font-size: 1.25rem; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.44rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5625rem; }
}

ol, ul, menu { list-style: none; }


/* ------------------- Links ------------------- */
a {
  color: hsl(250, 84%, 54%);
  text-decoration: none;
}


/* ------------------- Forms ------------------- */
button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}


/* ------------------- Media ------------------- */
img, video, svg {
  display: block;
  max-width: 100%;
}


/* ------------------- Fonts ------------------- */
.crimson-text-regular,
.crimson-text-semibold,
.crimson-text-bold,
.crimson-text-regular-italic,
.crimson-text-semibold-italic,
.crimson-text-bold-italic,
.great-vibes-regular {
  font-family: "Crimson Text", serif;
}

.crimson-text-regular { font-weight: 400; font-style: normal; }
.crimson-text-semibold { font-weight: 600; font-style: normal; }
.crimson-text-bold { font-weight: 700; font-style: normal; }
.crimson-text-regular-italic { font-weight: 400; font-style: italic; }
.crimson-text-semibold-italic { font-weight: 600; font-style: italic; }
.crimson-text-bold-italic { font-weight: 700; font-style: italic; }

.great-vibes-regular {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-style: normal;
}


/* ------------------- Layout ------------------- */
html, body {
  display: grid;
  height: 100%;
  width: 100%;
  place-items: center;
  background: linear-gradient(315deg, #f4f6f8 0%, #e6f0f3 100%);
}

.container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 40px;
  width: 100%;
  max-width: 1500px;
  margin: 50px auto;
}

.skills h1 {
  margin-top: 15px;
  margin-bottom: 25px;
}

.hobbies h1 {
  margin-top: 15px;
  margin-bottom: 25px;
}

.skills {
  grid-column: 1;
  justify-self: end;
  text-align: right;
  padding-right: 80px;
  max-width: 450px;
  width: 100%;
}

.hobbies {
  grid-column: 3;
  justify-self: start;
  text-align: left;
  padding-left: 80px;
  max-width: 450px;
  width: 90%;
}


.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 40px 0;
}


/* ------------------- Buttons ------------------- */
.button-80 {
  background: #fff;
  backface-visibility: hidden;
  border-radius: .375rem;
  border-style: solid;
  border-width: .125rem;
  box-sizing: border-box;
  color: #212121;
  cursor: pointer;
  display: inline-block;
  font-family: Circular,Helvetica,sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  padding: .570rem .900rem;
  position: relative;
  text-align: left;
  text-decoration: none;
  transform: translateZ(0) scale(1);
  transition: transform .2s;
  user-select: none;
  touch-action: manipulation;
}

.button-80:not(:disabled):hover { transform: scale(1.05); }
.button-80:not(:disabled):hover:active { transform: scale(1.05) translateY(.125rem); }
.button-80:focus { outline: 0 solid transparent; }
.button-80:focus:before {
  content: "";
  left: -0.375rem;
  position: absolute;
  top: -0.375rem;
  pointer-events: none;
  transition: border-radius;
  user-select: none;
}
.button-80:focus:not(:focus-visible) { outline: 0 solid transparent; }
.button-80:focus:not(:focus-visible):before { border-width: 0; }
.button-80:not(:disabled):active { transform: translateY(.125rem); }

.wrapper .button {
  display: inline-block;
  height: 60px;
  width: 60px;
  margin: 0 5px;
  overflow: hidden;
  background: #fff;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-out;
}

.wrapper .button:hover { width: 200px; }

.wrapper .button .icon {
  display: inline-block;
  height: 60px;
  width: 60px;
  text-align: center;
  border-radius: 50px;
  line-height: 60px;
  transition: all 0.3s ease-out;
  color: #000;
}

.wrapper .button .icon i {
  font-size: 25px;
  line-height: 60px;
  transition: all 0.3s ease-out;
}

.wrapper .button:hover .icon i {
  color: #fff;
}

.wrapper .button span {
  font-size: 20px;
  font-weight: 500;
  line-height: 60px;
  margin-left: 10px;
  transition: all 0.3s ease-out;
}

/* Icon hover colors */
.button.youtube:hover .icon { background: #FF0000; }
.button.chess:hover .icon { background: #69923e; }
.button.steam:hover .icon { background: #171A21; }
.button.leetcode:hover .icon { background: #fea118; }
.button.github:hover .icon { background: #333; }
.button.fastfingers:hover .icon { background: #aad23b; }
.button.facebook:hover .icon { background: #4267B2; }
.button.pinterest:hover .icon { background: #E60023; }
.button.telegram:hover .icon { background: #0088cc; }
.button.discord:hover .icon { background: #5865F2; }
.button.anilist:hover .icon { background: #02a9ff; }
.button.linkedin:hover .icon { background: #0a66c2; }
.button.upwork:hover .icon { background: black; }
.button.gitlab:hover .icon { background: #e96f24; }
.button.whatsapp:hover .icon { background: #01e301; }



.button.youtube span { color: #FF0000; }
.button.chess span { color: #69923e; }
.button.steam span { color: #171A21; }
.button.leetcode span { color: #fea118; }
.button.github span { color: #333; }
.button.fastfingers span { color: #aad23b; }
.button.facebook span { color: #4267B2; }
.button.pinterest span { color: #E60023; }
.button.telegram span { color: #0088cc; }
.button.discord span { color: #5865F2; }
.button.anilist span { color: #02a9ff; }
.button.linkedin span { color: #0a66c2; }
.button.upwork span { color: black; }
.button.gitlab span { color: #e96f24; }
.button.whatsapp span { color: #01e301; }


/* ------------------- Components ------------------- */
.language-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
  gap: 15px;
  height: 100%;
  margin: 25px 0;
}

.language-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 18px;
}

.language-options {
  padding-top: 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.button-container {
  display: flex;
  gap: 10px;
}

.language-container h2 {
  font-size: 0.9rem;
  margin: 5px;
  color: #888;
  text-align: center;
}

.icon-image {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 370px;
  min-width: 370px;
}

.icon-image img {
  max-width: 90%;
  height: auto;
  border-radius: 40px;
  object-fit: contain;
}

.projects-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 60px 80px 90px 80px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  max-width: 1400px;
  margin: 80px 100px 80px 100px;
  text-align: center;
}

.projects-header {
  text-align: left;
  padding-bottom: 12px;
  padding-left: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.project-section {
  margin-top: 50px;
}

.project-section h2 {
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: #222;
}

.projects-side-gif {
  position: absolute;
  right: 130px;
  top: 83%;
  width: 180px;
  height: 180px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

/* Show GIF ONLY when hovering over its invisible area */
.projects-side-gif:hover {
  opacity: 1;
}

.projects-side-gif::before {
  position: absolute;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  font-size: 16px;
  transition: opacity 1s ease;
  pointer-events: none;
}

.projects-side-gif:hover::before {
  opacity: 0;
}

.projects-side-gif img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.project-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 380px;
  flex-shrink: 0;
}

.project-item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  image-rendering: auto;
}

.project-item p {
  margin-top: 10px;
  font-weight: 500;
  color: #666;
  font-size: 1rem;
  text-align: center;
}

.horizontal-pill-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: nowrap;
}

.horizontal-pill-links a,
.horizontal-pill-links span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 220px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  background-color: #f1f1f1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  transition: background-color 0.2s ease-in-out;
}

.horizontal-pill-links a:hover {
  background-color: #e0e0e0;
}


/* ------------------- Background Effects ------------------- */
#the-world-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

body.the-world-active #main-content {
  opacity: 0.2;
  transition: opacity 1s ease-in-out;
}

body.time-resumes #main-content {
  opacity: 1;
}


/* ------------------- Utilities ------------------- */
li { margin-bottom: 8px; }

.icon-group { margin: 15px 0; }

.yare-yare {
  margin: 70px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.yare-yare h1 {
  width: 100%;
}

.project-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  cursor: pointer;
}

.project-link:hover {
  color: black;
  text-decoration: underline;
}

#anime-manga-text {
    display: inline-block;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.drop-one {
    position: fixed;
    font-size: 20px;
    font-weight: 700;
    color: black;
    pointer-events: none;
    user-select: none;
    z-index: 9999;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: system-ui, sans-serif;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

@media (max-width: 1024px) {
  .hobbies {
    padding-left: 20px;
  }

  .skills {
    padding-right: 20px;
  }

}

@media (max-width: 850px) {
  .hobbies {
    padding-left: 5px;
  }

  .skills {
    padding-right: 5px;
  }

  .wrapper {
    gap: 10px;
  }

}

@media (max-width: 810px) {

  .skills li,
  .hobbies li {
    white-space: normal !important;
    word-break: break-word;
    padding: 0 5px;
  }

  .container {
    gap: 5px;
    padding: 0 !important;
  }

  .wrapper {
    gap: 0;
    margin-right: 20px;
  }
}


/* ------------------- Mobile Styles (<= 768px) ------------------- */
@media (max-width: 768px) {
  /* Typography */
  body {
    font-size: 1.2rem;
  }

  html, body {
    position: relative;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
  }


  body {
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.4rem; }

  /* Layout Structure */
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 30px;
    padding: 0 10px !important;
    margin: 0 auto !important;
    width: 100%;
    overflow: hidden;
  }

  /* Skills & Hobbies Sections */
  .skills, .hobbies {
    grid-column: 1;
    justify-self: center;
    text-align: center;
    padding: 0 5px !important;
    max-width: 100%;
  }

  .skills ul, .hobbies ul {
    padding: 0 5px !important;
  }

  .skills li, .hobbies li {
    white-space: nowrap;
    margin-bottom: 12px;
  }

  /* Profile Icon */
  .icon-image {
    grid-column: 1;
    grid-row: 2;
    width: 220px;
    min-width: 220px;
    margin: 10px auto;
    padding: 0;
  }

  .language-container {
    margin-top: 110px;
    margin-bottom: 80px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 5px;
  }

  .language-header {
    transform: rotate(15deg);
    margin-bottom: -30px;
    width: 100%;
  }

  .language-options {
    width: 100%;
  }

  .language-options .button-container {
    display: flex;
    justify-content: center;
    transform: rotate(15deg);
    gap: 8px;
    margin: 0 -15px;
    padding: 15px 0;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
  }

  .language-options .button-80 {
    min-width: 100px;
    padding: 0.7rem 0.5rem;
    font-size: 1rem;
    transform: rotate(-1deg);
    white-space: nowrap;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
    will-change: transform;
    backface-visibility: hidden;
  }

  .language-options .button-80:active {
    transform: rotate(-1deg) translateY(2px);
  }

  .translate-hint {
    transform: rotate(15deg);
    margin: 10px 0 0 -15px;
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
  }

  /* Social Buttons */
  .wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    margin-bottom: 70px;
    padding: 0 5px !important;
    width: 100%;
  }

  .icon-group {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 8px 0;
    gap: 15px !important;
  }

  .wrapper .button {
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .wrapper .button:hover {
    width: 200px;
  }

  /* Projects Section */

  .image-row {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 5px;
  }

  .project-item {
    width: 100%;
    max-width: 100%;
    padding: 0 5px;
  }

  .project-item img {
    width: 100%;
    max-width: 100%;
  }

  .projects-container {
    padding: 30px 15px 70px 15px !important;
    margin: 40px 10px 80px 10px !important;
    width: calc(100% - 20px);
    box-sizing: border-box;
  }

  .horizontal-pill-links {
    flex-direction: column;
    gap: 20px;
  }

  .horizontal-pill-links a,
  .horizontal-pill-links span {
    min-width: 240px;
    padding: 14px 28px;
    font-size: 1.2rem;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    justify-content: center;
  }

  .projects-side-gif {
    right: 10px;
    bottom: 10px;
    width: 100px;
    height: 100px;
  }

  .projects-side-gif {
    display: none !important; /* Forcefully hide on phones */
  }
}

/* ------------------- Tiny Phones (<= 480px) ------------------- */
@media (max-width: 480px) {
  .container {
    padding: 0 5px !important;
  }

  .icon-image {
    width: 200px;
    min-width: 200px;
  }

  .language-header {
    transform: rotate(13deg);
    margin-bottom: -15px;
  }

  .language-options .button-container {
    transform: rotate(15deg);
    gap: 6px;
    margin: 0 -10px;
  }

  .language-options .button-80 {
    min-width: 85px;
    padding: 0.6rem 0.4rem;
    font-size: 0.9rem;
  }

  .translate-hint {
    transform: rotate(15deg);
    margin-top: 8px;
    font-size: 0.8rem;
  }

  /* Social Buttons */
  .icon-group {
    margin: 6px 0;
    gap: 10px !important;
  }

  .wrapper .button {
    width: 54px;
    height: 54px;
  }

  .wrapper .button .icon,
  .wrapper .button .icon i,
  .wrapper .button span {
    width: 54px;
    height: 54px;
    line-height: 54px;
  }

  /* Projects Section */
  .projects-container {
    padding: 30px 1px 70px 1px !important;
    margin: 30px 5px 80px 5px !important;
    width: calc(100% - 10px);
  }

  .horizontal-pill-links a,
  .horizontal-pill-links span {
    min-width: 200px;
    padding: 12px 20px;
    font-size: 1.1rem;
  }

  .horizontal-pill-links {
    gap: 20px !important;
    padding: 0 5px !important;
  }

  .project-item p {
    padding: 0 5px;
  }

}



/* Container for the row of site buttons */
.sites-buttons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Text-only site buttons */
.sites-button {
  display: inline-block;
  padding: 14px 28px;       /* bigger padding */
  font-size: 1.2rem;        /* larger text */
  font-weight: 600;
  border: 2px solid #444;   /* dark outline */
  border-radius: 10px;
  text-decoration: none;
  color: #222;              /* dark text */
  background: #fff;         /* white background */
  transition: all 0.25s ease;
  cursor: pointer;
}

.sites-button:hover {
  background: #444;         /* dark background on hover */
  color: #fff;              /* invert text */
  text-decoration: none;    /* keep clean */
}
