/* Custom */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* general */
body{
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;
  -webkit-tap-highlight-color: transparent; 
}


h1, 
h2,
h5, 
p {
    margin: 0;
}

.icon {
    height: 2rem;
    width: 2rem;
    margin: 0 0.5rem;
}

#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: #112D38F5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease, visibility 1s ease;
}

.preloader-text {
  position: relative;
  width: 100%;
  height: 5rem; 
  display: flex;
  align-items: center;
  justify-content: center;
}

.hello {
  position: absolute;
  opacity: 0;
  font-size: 5rem;
  font-family: 'Montserrat', sans-serif;
  width: 100%;
  text-align: center;
  animation: rotateHello 5s infinite;
  color: #F2F4F1;
}

.hello-1 { animation-delay: 0s; }
.hello-2 { animation-delay: 0.5s; }
.hello-3 { animation-delay: 1s; }
.hello-4 { animation-delay: 1.5s; }
.hello-5 { animation-delay: 2s; }

@keyframes rotateHello {
  0%   { opacity: 0; transform: translateY(10px); }
  10%  { opacity: 1; transform: translateY(0); }
  20%  { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 0; }
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

#page-transition {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #112D38;
  color: #F2F4F1;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s ease;
  animation: fadeOut 2.5s ease forwards;
}

#page-transition h1 {
  font-size: 4rem;
  animation: textPop 1s ease-in-out;
}

@keyframes fadeOut {
  0%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes textPop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Loader Screen */

#page-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(135deg, #112D38, #165267);
  color: #F2F4F1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out;
}

#page-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-text {
  animation: pulse 2s infinite;
}

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




/* index.html */
html {
  scroll-behavior: auto; /* Disable native smooth behavior so we use custom animation */
}


/* see all projects */
.view-all-card .btn {
  margin-top: 10px;
  background-color: #112D38;
  color: #F2F4F1;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid #F2F4F1;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.view-all-card .btn:hover {
  background-color: #F2F4F1;
  color: #112D38;
}

/* HERO */

#hero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#hero__animation {
  width: 100%;
  max-width: 25rem;
  height: auto;
  aspect-ratio: 1/1; /* Keeps it square, but responsive */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero__animation__img {
  width: 100%;
  height: 100%;
  background-image: var(--tl-1);
  background-position: center;
  background-size: contain; /* Show the whole image */
  background-repeat: no-repeat;
  border-radius: 12px;
}

@media (max-width: 600px) {
  #hero__animation {
    max-width: 90vw;
    aspect-ratio: 1/1;
  }
}


/* GRID COMMON STYLES */

#grid {
    position: absolute;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }

#grid__tl__btn,
#grid__tr__btn,
#grid__bl__btn,
#grid__br__btn {
  height: 18.75rem;
  width: 18.75rem;
  background: var(--bg);
  color: var(--text);
  border: var(--border);
  position: fixed;
  display: flex;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
  font-size: 1.5rem;
  z-index: 100;
  border-radius: 40%;
  transition: transform 0.2s ease-in-out;
}

#grid__tl__content,
#grid__tr__content,
#grid__bl__content,
#grid__br__content {
  position: absolute;
  text-align: center;
  transition: transform 0.3s ease-in-out;
  color: var(--text-alt);
}

#grid__tl__btn,
#grid__tr__btn {
  padding-bottom: 0.5rem;
  align-items: flex-end;
}

#grid__bl__btn,
#grid__br__btn {
  padding-top: 0.5rem;
}
#grid__tl__btn:active,
#grid__br__btn:active {
  transform: rotate(-45deg) scale(1.05);
}

#grid__tr__btn:active,
#grid__bl__btn:active {
  transform: rotate(45deg) scale(1.05);
}

/* TOP LEFT CORNER */


#grid__tl__btn {
    top: -11.5rem;
    left: -11.5rem;
    transform: rotate(-45deg);
}

#grid__tl__content {
width: 30vw;
top: 10vh;
left: 0;
transform: translateX(-100vw) translateY(-100vh);
}

article {
background: #F2F4F1;
font-size: 0.8rem;
list-style: none;
border: var(--border);
border-radius: 2rem;
padding: 0.5rem;
margin: 1rem;
width: 8.75rem;
min-width: 8.75rem;
}

article h2 {
font-size: 1rem;
padding: 0.3rem;
}

article h4 {
font-size: 1rem;
padding: 0.3rem;
}

article p {
padding-bottom: 0.3rem;
}

article h2,
article h4,
article p {
color: #165267;
}

.cards {
padding: 0;
}

.cards__content {
display: flex;
align-items: center;
}

.cards__content__text {
color: var(--text);
text-align: left;
margin: 0 1rem;
}

/* TOP RIGHT CORNER */

#grid__tr__btn {
  top: -11.5rem;
  right: -11.5rem;
  transform: rotate(45deg);
}

#grid__tr__content {
  width: 30vw;
  top: 10vh;
  right: 0;
  transform: translateX(100vw) translateY(-100vh);
} 

.experience {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}


/* .experience__skill {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  gap: 0.2rem;
  margin: 0;
  width: fit-content;
}  */


.experience__skill div {
  display: flex;
  align-items: center;
  width: 13.5rem;
}

.experience__skill div img {
  padding: 0;
  margin-right: 0.5rem;
}

.experience__skill div h2 {
  text-align: left;
}

.experience__skill div p {
  padding: 0;
}

.experience__skill div h2,
.experience__skill div p {
  font-size: 0.8rem;
}

.experience__skill div div {
  justify-content: space-between;
}
.experience__skill,
.experience__framework {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  gap: 0.5rem;
  margin: 0;
  width: fit-content;         /* Match language box width */
  height: 15rem;          /* Force height to contain scroll */
  background: #F2F4F1;
  border-radius: 2rem;
  box-sizing: border-box;
  overflow: hidden;
}

.framework__grid {
  max-height: 10rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #888 #eee;
  /* Remove horizontal scrollbar by preventing overflow-x */
  overflow-x: hidden;
}

.framework__grid::-webkit-scrollbar {
  width: 5px;
}

.framework__grid::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.framework__grid p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: bold;
  /* text-align: center;
  color: #165267; */
}

/* BOTTOM LEFT CORNER */

#grid__bl__btn {
  bottom: -11.5rem;
  left: -11.5rem;
  transform: rotate(45deg);
}

#grid__bl__content {
  width: 15rem;
  bottom: 15vh;
  left: 0;
  transform: translateX(-100vw) translateY(100vh);
}

.project {
  width: 70%;
  display: flex;
  flex-direction: column;
  border-radius: 2rem;
  overflow: hidden;
  margin: auto auto 0.5rem;
  border: var(--border);
  background: var(--bg-alt);
  min-width: 250px;
}

.project__img {
  width: 100%;
  aspect-ratio: 1/1;    /* Traditional, balanced */
  object-fit: cover;
}

.project__title {
  width: 100%;
  margin: 0;
  padding: 0.3rem 0;
  font-size: 1rem;
}

.project .btn {
  flex: 1;
  margin: 0;
  border-radius: 0;
}

button {
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: 1rem;
  padding: 0.5rem;
}

.btn {
  border-radius: 0;
  height: 3rem;
  flex-basis: 50%;
  font-weight: 600;
}

.arrow {
  border: var(--border);
  width: 3rem;
  height: 2rem;
  margin: 0;
  padding: 0.2rem 0;
}

.btn,
.arrow {
  background-color: #F2F4F1;
  color: #165267;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn:active,
.arrow:active {
  background: var(--bg-alt);
  color: #F2F4F1;
  cursor: pointer;
}

.btn:hover,
.arrow:hover {
  background-color: #165267;
  color: #F2F4F1;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* BOTTOM RIGHT CORNER */

#grid__br__btn {
  bottom: -11.5rem;
  right: -11.5rem;
  transform: rotate(-45deg);
}

#grid__br__content {
  bottom: 0;
  right: 0vw;
  transform: translateX(100vw) translateY(100vh);
}

#grid__br__content div {
  display: flex;
  margin: 0.5rem auto;
  gap: 1.2rem;
  width: 17rem;
}

.contact-text {
  color: var(--text);
}

.btn-contact {
  border: var(--border);
  border-radius: 2rem;
}

.resume-button:hover {
  background-color: #008C96;
}


.resume-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  position: relative;
  z-index: 10; /* Ensures button is clickable */
}

.resume-button {
  background: var(--bg-alt-2);
  color: var(--text);
  padding: 12px 24px;
  font-size: 18px;
  border: var(--border);
  border-radius: 2rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  z-index: 11; /* Ensures button stays on top */
  position: relative;
}