@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}
html {
  scroll-behavior: smooth;
}

:root {
    --bg-color: #f9f9f9;
    --second-bg-color: #112e42;
    --text-color: #000000;
    --main-color: #556b2f;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.header.sticky {
    background: var(--bg-color);
}

.logo {
    position: relative;
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.navbar a,
.navbar button {
  font-size: 1.7rem;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 3.5rem;
  transition: .3s;
  background: none;      /* remove default button background */
  border: none;          /* remove default border */
  cursor: pointer;       /* make it behave like link */
  font-family: inherit;  /* keep same font */
  padding: 0;            /* remove default padding */
}

.navbar a:hover,
.navbar a.active,
.navbar button:hover,
.navbar button.active {
  color: #556b2f;
}

#menu-icon {
    position: relative;
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* HOME SECTION */
.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 9%;
    background: url('/images/home.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    flex-wrap: wrap;
}

.home-content {
    max-width: 60rem;
    z-index: 99;
    flex: 1;
}

.home-content h1 {
    font-size: 5.12rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content h1 span {
    color: var(--text-color);
}

.home-content .text-animate {
    width: 32.8rem;
    position: relative;
}

.home-content .text-animate h3 {
    font-size: 3.05rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: .7px var(--main-color);
    background-image: linear-gradient(var(--main-color), var(--main-color));
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-position: -33rem 0;
}

.home.show-animate .home-content .text-animate h3 {
    animation: homeBgText 6s linear infinite;
    animation-delay: 2s;
}

.home-content .text-animate h3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    border-right: 2px solid var(--main-color);
    z-index: -1;
}

.home.show-animate .home-content .text-animate h3::before {
    animation: homeCursorText 6s linear infinite;
    animation-delay: 2s;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
}

.btn-box {
    display: flex;
    justify-content: space-between;
    width: 34.5rem;
    height: 5rem;
}

.btn-box .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 15rem;
    height: 100%;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: .8rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--bg-color);
    z-index: 1;
    overflow: hidden;
    transition: .5s;
    position: relative;
}

.btn-box .btn:hover {
    color: var(--main-color);
}

.btn-box .btn:nth-child(2) {
    background: transparent;
    color: var(--main-color);
}

.btn-box .btn:nth-child(2):hover {
    color: var(--bg-color);
}

.btn-box .btn::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}


.btn-box .btn:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: .5s;
}

.btn-box .btn:hover::before {
    width: 100%;
}


.home-imgHover {
    /* We are removing the absolute positioning to allow the image to flow with the rest of the content */
    top: auto; /* Revert this property */
    right: auto; /* Revert this property */
    width: 37%;
    height: 90%;
    background: transparent;
    transition: 3s;
    /* You can use margins to position the image on the right if you like */
    margin-left: 10%;
}


.home-imgHover img {
    width: 100%;
    height: 100%;
    display: block;
}



/* SOCIAL ICONS */
.home-sci {
    position: absolute;
    bottom: 4rem;
    display: flex;
    gap: 1rem;
}

.home-sci a {
    width: 40px;
    height: 40px;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 20px;
    color: var(--main-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.home-sci a:hover {
    color: var(--bg-color);
}

.home-sci a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: .5s;
}

.home-sci a:hover::before {
    width: 100%;
}

/* About Section */
.about {                                  
 
    background: var(--bg-color);
    padding: 30px 15%;
    color: var(--text-color);
}

/* Heading */
.about .heading {
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  font-size: 5.0rem; /* ~32px heading */
}

.about .heading span {
  color: var(--main-color); /* main highlight */
}

/* Move .intro and .about-buttons further down */
.about .intro {
  text-align: center;
  margin-bottom: 30px;
  margin-top: 40px; /* move the intro further down */
  line-height: 1.8;
  font-size: 1.8rem; /* ~18px */
}

.about .intro span {
  color: var(--main-color);
  font-weight: bold;
}

.about-content {
  max-width: 900px;
  margin: auto;
  text-align: center;
}

.about-text {
  margin-bottom: 30px;
  line-height: 1.8;
  font-size: 1.6rem; /* ~16px body text */
  color: var(--text-color);
}

/* Move buttons further down */
.about-buttons {
  margin-top: 40px;
}

/* About section buttons */
.about-buttons .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 15rem;
  height: 5rem;
  background: var(--main-color);
  border: .2rem solid var(--main-color);
  border-radius: .8rem;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--bg-color);
  z-index: 1;
  overflow: hidden;
  transition: .5s;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

/* First button hover */
.about-buttons .btn:first-child:hover {
  color: var(--main-color);
}

.about-buttons .btn:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--bg-color);
  z-index: -1;
  transition: .5s;
}

.about-buttons .btn:first-child:hover::before {
  width: 100%;
}

/* Outline button (Contact Me) */
.about-buttons .btn:nth-child(2) {
  background: transparent;
  color: var(--main-color);
}

.about-buttons .btn:nth-child(2):hover {
  color: var(--bg-color); /* text turns white */
}

.about-buttons .btn:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--main-color); /* fills main color */
  z-index: -1;
  transition: .5s;
}

.about-buttons .btn:nth-child(2):hover::before {
  width: 100%;
}

/* Animation effect */
.about-buttons .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--bg-color);
  z-index: -1;
  transition: .5s;
}

.about-buttons .btn:nth-child(2)::before {
  background: var(--main-color);
}

.about-buttons .btn:hover::before {
  width: 100%;
}

/* Highlight subheading "Contact Info" */


body {
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
}
/* Contact Section */
.contact-section {
  padding: 30px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-heading {
  text-align: center;
  font-size: 5.0rem;
  font-weight: bold;
  margin-bottom: 36px;
  color: var(--text-color);
}

.contact-heading span {
  color: var(--main-color);   /* Highlighted word */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 27px;
}

/* Contact Card */
.contact-card {
  background: var(--bg-color);
  padding: 28px 28px;
  border-radius: 14px;
  border: 2px solid var(--main-color);  /* card border */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 2px 38px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;   /* smooth hover transition */
  cursor: pointer;             /* indicate interactivity */
}

.contact-card h3 {
  margin: 0 0 9px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.contact-card p {
  margin: 0;
  font-size: 1.14rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}

/* Hover Effects */
.contact-card:hover {
  transform: translateY(-6px) scale(1.03); /* lift & zoom */
  border-color: var(--text-color);         /* change border */
  box-shadow: var(--main-color);
  background: var(--main-color);    /* subtle background change */
}

.contact-card:hover h3,
.contact-card:hover p {
  color: var(--bg-color);
}

/* Responsive */
@media (max-width: 600px) {
  .contact-section {
    padding: 48px 16px;
  }

  .contact-heading {
    font-size: 2.6rem;
  }

  .contact-card {
    padding: 22px 20px;
  }
}



/* ANIMATION RELOAD AND SCROLL */
.animate {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 98;
}

.animate.home-img {
    width: 50%;
}

.logo .animate,
.navbar .animate,
#menu-icon .animate,
.home.show-animate .animate {
    animation: showRight 1s ease forwards;
    animation-delay: calc(.3s * var(--i));
}

.animate.scroll {
    transition: 1s ease;
    transition-delay: calc(.3s / var(--i));
    animation: none;
}

section:nth-child(odd) .animate.scroll,
.footer .animate.scroll {
    background: var(--second-bg-color);
}

.education .education-box .animate.scroll {
    width: 105%;
}

.about.show-animate .animate.scroll,
.education.show-animate .animate.scroll,
.skills.show-animate .animate.scroll,
.contact.show-animate .animate.scroll,
.footer.show-animate .animate.scroll {
    transition-delay: calc(.3s * var(--i));
    width: 0;
}

::-moz-selection { /* Code for Firefox */
    color: var(--second-bg-color);
    background: var(--main-color);
  }
  
::selection {
    color: var(--second-bg-color);
    background: var(--main-color);
  }


/* BREAKPOINTS */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 10rem 4% 2rem;
    }

    .home {
        padding: 0 4%;
    }

    .footer {
        padding: 2rem 4%;
    }
}

@media (max-width: 850px) {
    .animate.home-img {
        width: 55%;
    }
}

@media (max-width: 768px) {
    .header {
        background: var(--bg-color);
    }

    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 4%;
        background: var(--main-color);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        z-index: 1;
        transition: .25s ease;
        transition-delay: .25s;
    }

    .navbar.active {
        left: 0;
        transition-delay: 0s;
    }

    .navbar .active-nav {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: 0s;
    }

    .navbar.active .active-nav {
        left: 0;
        transition-delay: .25s;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        transform: translateX(-20rem);
        transition: .25s ease;
        transition-delay: 0s;
    }

    .navbar.active a {
        transform: translateX(0);
        transition-delay: .25s;
    }

    .home-imgHover {
        pointer-events: none;
        background: var(--bg-color);
        opacity: .6;
    }
}

@media (max-width: 520px) {
    html {
        font-size: 50%;
    }

    .home-content h1 {
        display: flex;
        flex-direction: column;
    }

    .home-sci {
        width: 160px;
    }

    .home-sci a {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 462px) {
    .home-content h1 {
        font-size: 5.2rem;
    }

    .education {
        padding: 10rem 4% 5rem 5%;
    }

    .contact form .input-box .input-field {
        width: 100%;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        margin-top: 2rem;
        text-align: center;
    }
}

@media (max-width: 371px) {
    .home {
        justify-content: center;
    }

    .home-content {
        display: flex;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .home-content h1 {
        font-size: 5rem;
    }
}


/* KEYFRAMES ANIMATION */
@keyframes homeBgText {

    0%,
    10%,
    100% {
        background-position: -33rem 0;
    }

    65%,
    85% {
        background-position: 0 0;
    }
}

@keyframes homeCursorText {

    0%,
    10%,
    100% {
        width: 0;
    }

    65%,
    78%,
    85% {
        width: 100%;
        opacity: 1;
    }

    75%,
    81% {
        opacity: 0;
    }
}

@keyframes aboutSpinner {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
@keyframes showRight {
    100% {
        width: 0;
    }
}
