@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');

* {
   margin: 0;
   padding: 0;
   border: none;
   outline: none;
   box-sizing: border-box;
   text-decoration: none;
   font-family: "Poppins", sans-serif;
}

:root {
   --bg-colour: #1f242d;
   --second-bg-colour: #323946;
   --main-colour : #7cf03d;
   --white-colour: #fff;
   --disabled-colour: #fff3;
}

html{
   scroll-behavior: smooth;
   font-size: 62.5%;
}

body {
   color: var(--white-colour);
}

header {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   background: var(--bg-colour);
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 2rem 9%;
   z-index: 100;
   visibility: hidden;
   opacity: 0;
}

header.active {
   animation: show_header 1.5s linear forwards;
   animation-delay: 1.2s;
}

@keyframes show_header {
   100% {
      visibility: visible;
      opacity: 1;
   }
}

.logo {
   font-size: 2.5rem;
   font-weight: 700;
   color: var(--white-colour);
}

nav a {
   font-size: 1.8rem;
   font-weight: 500;
   color: var(--white-colour);
   margin-left: 2rem;
   transition: all 0.3s ease;
}

nav a:hover, nav a.active {
   color: var(--main-colour);
}

#menu_icon {
   display: none;
   font-size: 2.5rem;
   color: var(--white-colour);
   cursor: pointer;
}

.bars_box {
   position: absolute;
   width: 100%;
   height: 100%;
   display: flex;
}

.bars_box .bar {
   width: 100%;
   height: 100%;
   background: var(--bg-colour);
   animation: hide_bar 0.5s ease-in-out both;
   animation-delay: calc(.1s * var(--i));
}

@keyframes hide_bar {
   0% {
      transform: translateY(0);
   }

   100% {
      transform: translateY(-100%);
   }
}

.bars_box.active .bar {
   animation: animate_bar 0.5s ease-in-out both;
   animation-delay: calc(.1s * var(--i));
}

@keyframes animate_bar {
   0%{
      transform: translateY(-100%);
   }
   
   100%{
      transform: translateY(0);
   }
}

section {
   position: absolute;
   width: 100%;
   height: 100%;
   padding: 2rem 19% 1rem;
   visibility: hidden;
   opacity: 0;
   overflow: hidden;
}

section {
   padding: 10rem 6vw 2rem;
}

.services_container {
   max-width: 2100px;
   margin: 0 auto;
}

section.active {
   animation: show_content 1s linear forwards;
   animation-delay: 1.5s;
}

@keyframes show_content {
   100% {
      visibility: visible;
      opacity: 1;
      overflow: auto;
   }
}

.logo img{
   border-radius: 50%;
   width: 50px;
}

.home {
   display: flex;
   align-items: center;
   gap: 5rem;
}

.home_detail h1 {
   font-size: clamp(3rem, 5vw, 4.5rem);
   font-weight: 700;
   color: var(--white-colour);
}

.home_detail h2 {
   display: inline-block;
   font-size: clamp(1.5rem, 3vw, 2.5rem);
   font-weight: 500;
   color: var(--white-colour);
   margin-top: -1rem;
}

.home_detail h2 span {
   position: relative;
   display: inline-block;
   color: transparent;
   -webkit-text-stroke: 0.07rem var(--main-colour);
   /* animation: display-text 5s linear infinite; */
   animation-delay: calc(-4s * var(--i));
}

@keyframes display-text {
   25%, 100% {
      display: none;
   }
}



.home_detail h2 span::before {
   content: attr(data-text);
   position: absolute;
   inset: 0;
   max-width: max-content;
   border-right: .2rem solid var(--main-colour);
   color: var(--bg-colour);
   transform-origin: left;
   transform: scaleX(0);
   white-space: nowrap;
   overflow: hidden;
   animation: fill-text 4s linear infinite;
}

@keyframes fill-text {
   0%, 10%, 100% {
      width: 0;
   }
   70%, 90%{
      width: 100%;
   }
   
}

.role_line {
   display: flex;
   gap: .4rem;
   align-items: baseline;
}

.role_line .role {
   position: relative;
   display: inline-block;
}

/* optional: show the "base" text a little muted so the overlay looks like a fill */
.role_line .role {
   color: rgba(255, 255, 255, .55);
   /* adjust or remove if you want */
}

.role_line .role::before {
   will-change: transform;
}



.home_detail p {
   font-size: 1.8rem;
   color: var(--white-colour);
   margin: 1rem 0 2.5rem;
}

.home_detail .btn_sci {
   display: flex;
   align-items: center;
   gap: 1.5rem;
}

.btn {
   display: inline-block;
   padding: 0.8rem 2rem;
   font-size: 1.8rem;
   font-weight: 500;
   color: var(--bg-colour);
   background: var(--main-colour);
   border: .2rem solid var(--main-colour);
   box-shadow: 0 0 0.5rem var(--main-colour);
   border-radius: 4rem;
   transition: all 0.3s ease;
}

.btn:hover {
   color: var(--main-colour);
   background: transparent;
   /* font-size: 2rem; */
   box-shadow: none;
}

.accent_picker {
   display: flex;
   gap: .6rem;
   align-items: center;
   margin-top: 1rem;
}

.accent_btn {
   width: 14px;
   height: 14px;
   border-radius: 999px;
   border: 2px solid rgba(255, 255, 255, .22);
   background: var(--accent);
   cursor: pointer;
   color: var(--main-colour);
   transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.accent_btn_1 { --accent: #FF4D6D; }
.accent_btn_2 { --accent: #7CFF4C; }
.accent_btn_3 { --accent: #8B64E6; }
.accent_btn_4 { --accent: #00D1FF; }
.accent_btn_5 { --accent: #FFB020; }

.accent_btn:hover {
   transform: translateY(-1px) scale(1.08);
   box-shadow: 0 0 0 4px rgba(255, 255, 255, .06);
}

.accent_btn.is-active {
   border-color: var(--main-colour);
   box-shadow: 0 0 0 4px rgba(124, 255, 76, .12);
}

.home_detail .btn_sci .sci a {
   display: inline-flex;
   padding: 0.8rem;
   font-size: 2rem;
   border: .2rem solid var(--main-colour);
   border-radius: 50%;
   color: var(--main-colour);
   transition: all 0.3s ease;
   margin: 0 .8rem;
}


.home_detail .btn_sci .sci a:hover {
   color: var(--bg-colour);
   background: var(--main-colour);
   box-shadow: 0 0 0.5rem var(--main-colour);
}

.home_img .img_box {
   position: relative;
   width: 32vw;
   height: 32vw;
   border-radius: 50%;
   background: var(--second-bg-colour);
   padding: .5rem;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
}

.home_img .img_box::before,
.home_img .img_box::after {
   content: '';
   position: absolute;
   /* top: 0;
   left: 0; */
   width: 50rem;
   height: 50rem;
   border-radius: 50%;
   background: conic-gradient(transparent,transparent, transparent, var(--main-colour));
   animation: animate 10s linear infinite;
   transform: rotate(0deg);
}

.home_img .img_box::after {
   animation-delay: -5s;
}


.home_img .img_box .img_item {
   position: relative;
   width: 100%;
   height: 100%;
   border-radius: 50%;
   background: var(--bg-colour);
   border: 0.1rem solid var(--bg-colour);
   display: flex;
   justify-content: center;
   z-index: 1;
   /* animation: animate 10s linear infinite; */
   overflow: hidden;
}

@keyframes animate {
   0%{
      transform: rotate(315deg);
   }
   100%{
      transform: rotate(675deg);
   }
}

.home_img .img_box .img_item img {
   position: absolute;
   top: 3rem;
   left: 3rem;
   width: 100%;
   height: 100%;
   object-fit: cover;
   border-radius: 50%;
   mix-blend-mode: lighten;
}

@media (max-width: 480px) {
   header {
      padding: 2rem;
   }

   .home {
      flex-direction: column;
      text-align: center;
      gap: 3rem;

   }

   .home_img .img_box {
      width: 50vw;
      height: 50vw;
   }
   .btn {
      height: 3.5rem;
      width: 20rem;
      font-size: .5rem;
   }
}

.heading {
   font-size: 4.5rem;
   text-align: center;
   margin-bottom: 2rem;
}

.heading span {
   color: var(--main-colour);
}



.services_container {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
   gap: 2rem;
   align-items: stretch;
}

.services_container .services_box {
   padding: 2rem 2.5rem;
   background: var(--second-bg-colour);
   border: .2rem solid var(--second-bg-colour);
   border-radius: 1rem;
   transition: .5s;
}

.services_box {
   display: flex;
   flex-direction: column;
   background: var(--main-colour);
   border: 1px solid rgba(255, 255, 255, .08);
   border-radius: 1.6rem;
   padding: 2rem;
   min-height: 240px;
}

.services_container .services_box:hover {
   border-color: var(--main-colour);
   transform: scale(1.02);
}

.services_box .icon {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 1rem;
   font-size: 5rem;
}

.services_box {
   transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
   border: 1px solid rgba(255, 255, 255, .08);
}

.services_box:hover {
   transform: translateY(-4px);
   border-color: rgba(124, 240, 61, .5);
   /* or var(--main-colour) with opacity */
   box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

.services_box .icon i {
   font-size: 4.5rem;
}

.services_box:hover .icon :not(a i){
   color: var(--main-colour);
}

.services_box:hover .icon a {
   background: var(--main-colour);
}

.services_box .icon a{
   display: inline-flex;
   background: var(--white-colour);
   border-radius: 50%;
   padding: 1rem;
   font-size: 1.5rem;
}

.services_box .icon a i {
   font-size: 3rem;
   color: var(--bg-colour);
   transform: rotate(225deg);
}

.services_box .icon a:hover i {
   transform: rotate(180deg);
}

.services_box h3 {
   font-size: 2rem;
   margin-bottom: .6rem;
   /* color: var(--main-colour); */
   transition: .5s;
}

.services_box:hover h3{
   color: var(--main-colour);
}

.services_box p {
   font-size: 1.5rem;
   color: rgba(255, 255, 255, .85);
   line-height: 1.6;
   flex: 1;
}

.services_box.active {
   border: 2px solid var(--main-colour);
   box-shadow: 0 0 0 4px rgba(255, 255, 255, .03);
}

.more {
   width: 42px;
   height: 42px;
   border-radius: 999px;
   display: grid;
   place-items: center;
   background: rgba(255, 255, 255, .08);
   color: var(--main-colour);
   cursor: pointer;
}

.service_more {
   margin-top: 1rem;
   padding-top: 1rem;
   border-top: 1px solid rgba(255, 255, 255, .08);
   font-size: 1.5rem;
   /* color: var(--main-colour); */
}



.service_more {
   margin-top: 1rem;
   padding-top: 1rem;
   border-top: 1px solid rgba(255, 255, 255, .08);
}

/* list layout + readable colour */
.service_more ul {
   margin: 0;
   padding-left: 1.6rem;
   display: grid;
   gap: .6rem;
}

.service_more li {
   font-size: 1.5rem;
   line-height: 1.5;
   color: rgba(255, 255, 255, .85);
   /* text */
}

/* only the bullet is green */
.service_more li::marker {
   color: var(--main-colour);
}


.more i {
   transition: transform .2s ease;
}

.more[aria-expanded="true"] i {
   transform: rotate(-90deg);
}

.resume_container {
   display: grid;
   grid-template-columns: 1fr 2fr;
   gap: 5rem;
}

.resume_box h2 {
   font-size: 4.5rem;
}

.resume_box p {
   font-size: 1.6rem;
}

.resume_box .desc {
   margin: 2rem 0 2.5rem;
}

.resume_box .resume_btn {
   width: 100%;
   height: 5.3rem;
   background: var(--second-bg-colour);
   border: .2rem solid var(--second-bg-colour);
   font-size: 1.6rem;
   color: var(--white-colour);
   font-weight: 500;
   margin-bottom: 2rem;
   border-radius: .8rem;
   cursor: pointer;
}

.resume_box .resume_btn.active {
   border-color: var(--main-colour);
   color: var(--main-colour);
}

.resume_details {
   display: none;
}

.resume_details.active{
   display: block;
}


.resume_box .heading {
   font-size: 3.5rem;
   text-align: left;
}

.resume_list{
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(40rem, 1fr));
   gap: 1rem;
   height: 70rem;
   width: 100%;
   overflow: auto;

}

.resume_list::-webkit-scrollbar{
   width: .7rem;
}

.resume_list::-webkit-scrollbar-thumb{
   background: transparent;
   border-radius: 1rem;
}

.resume_list::-webkit-scrollbar-thumb{
   background: var(--main-colour);
   
}


.resume_list .resume_item {
   background: var(--second-bg-colour);
   border-radius: .8rem;
   padding: 3rem 2.5rem;
   height: calc((56rem - 2rem) / 2);
   display: flex;
   flex-direction: column;
   justify-content: center;
}

.resume_item .year{
   font-size: 1.8rem;
   font-weight: 500;
   color: var(--main-colour);
   margin-bottom: 1rem;
}

.resume_item h3 {
   font-size: 0.5rem;
   font-weight: 600;
   color: var(--white-colour);
   margin-bottom: .8rem;
   transition: color .25s ease;
   margin: 10px 0;
}


.resume_item .company {
   position: relative;
   margin-left: 2rem;
   /* margin-bottom: 2rem; */
}

.resume_item .company::before {
   content: '';
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   padding: .5rem;
   background: var(--main-colour);
   border-radius: 50%;
   margin-left: -2rem;
}

.resume_details.skills .desc {
   bottom: 100px;
}

.resume_details.skills .resume_list {
   grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
   height: auto;
   overflow: visible;
   margin: 40px 20px 20px;
}

.resume_details.skills .resume_item {
   position: relative;
   align-items: center;
   height: auto;
}

.resume_details.skills .resume_item i {
   font-size: 8.5rem;
}

.resume_details.skills .resume_item:hover i {
   color: var(--main-colour);
}

.resume_details.skills .resume_item span {
   position: absolute;
   top: -20%;
   background: transparent;
   color: var(--main-colour);
   font-size: 1.6rem;
   padding: .5rem 1rem;
   border-radius: .6rem;
   pointer-events: none;
   opacity: 0;
   transform: scale(.9);
   transition: .2s;
}

.resume_details.skills .resume_item:hover span {
   top: -25%;
   opacity: 2;
   transform: scale(1);
}

.resume_details.about .resume_list {
   height: auto;
   overflow: visible;
   margin: 0px 10px 20px;
   grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
}

.resume_details.about .resume_item {
   height: auto;
   padding: 0 0 10px;
   background: transparent;
}

.resume_details.about .resume_item p {
   color: var(--main-colour);
}

.resume_details.about .resume_item p span {
   color: var(--white-colour);
   margin-left: 1rem;
   font-size: 2rem;
}

.portfolio_container {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 3rem;
}

.portfolio_details {
   display: none;
}

.portfolio_details.active {
   display: block;
}

.portfolio_box .numb {
   font-size: 8rem;
   -webkit-text-stroke: 0.07rem var(--white-colour);
   color: transparent;
   line-height: 1;
}


.portfolio_box h3 {
   font-size: 3.5rem;
   margin: .8rem 0 2rem;
}

.portfolio_box p {
   font-size: 1.6rem;
}

.portfolio_box .tech {
   margin: 2rem 0;
   color: var(--main-colour);
   border-bottom: .1rem solid var(--main-colour);
   padding-bottom: 2rem;
}

.portfolio_box .live_github a {
   position: relative;
   display: inline-flex;
   padding: 1.3rem;
   font-size: 2rem;
   color: var(--white-colour);
   border-radius: 50%;
   background: var(--second-bg-colour);
   transition: .5s;
}

.portfolio_box .live_github a:hover {
   color: var(--main-colour);
}

.portfolio_box .live_github a:first-child{
   margin-right: 3rem;
}
.portfolio_box .live_github a:first-child i{
   transform: rotate(135deg);
}

.portfolio_box .live_github a span {
   position: absolute;
   top: -60%;
   left: 50%;
   transform: translateX(-50%) scale(0.9);
   font-size: 1.6rem;
   white-space: nowrap;
   padding: .5rem 1rem;
   border-radius: 0.6rem;
   pointer-events: none;
   background: var(--main-colour);
   color: var(--bg-colour);
   opacity: 0;
   transition: .2s;
}

.portfolio_box .live_github a:hover span {
   top: -70%;
   opacity: 1;
   scale: 1;
   transform: translateX(-50%) scale(1);
}

.portfolio_box .portfolio_carousel {
   width: 100%;
   height: 45rem;
   border-radius: 1rem;
   overflow: hidden;
}

.portfolio_carousel img {
   height: 100%;
   width: 100%;
}

.portfolio_carousel .img_slide {
   display: grid;
   grid-auto-flow: column;
   grid-auto-columns: 100%;
   gap: 2rem;
   height: inherit;
   transition: .5s;
}

.portfolio_carousel .img_item {
   height: inherit;
}

.portfolio_carousel .img_item img {
   display: block;
   width: 100%;
   height: 100%;
   object-fit: cover;
   border-radius: 1rem;
}

.portfolio_box .navigation {
   text-align: right;
   margin-top: 2rem;
}

.portfolio_box .navigation button {
   display: inline-flex;
   padding: .4rem;
   background: var(--second-bg-colour);
   border: .2rem solid var(--main-colour);
   border-radius: .6rem;
   font-size: 4rem;
   color: var(--main-colour);
   cursor: pointer;
}

.portfolio_box .navigation button.disabled{
   border-color: var(--second-bg-colour);
   color: var(--disabled-colour);
}

.portfolio_box .navigation .arrow_right {
   margin-left: 1.5rem;
}

.contact_container {
   display: grid;
   grid-template-columns: 1fr 1.3fr;
   gap: 3rem;
}

.contact_container .contact_box:first-child {
   background: var(--second-bg-colour);
   border-radius: .8rem;
   padding: 3rem 2.5rem;
   align-items: center;
}



.contact_container {
   margin: 0 auto;
}

.contact_box h2 {
   font-size: 4.5rem;
   color: var(--white-colour);
}

.contact_box p {
   font-size: 1.6rem;
   color: var(--white-colour);
   margin: 2rem 0 2.5rem;

}

.contact_box .desc {
   /* margin-bottom: 2rem; */
   margin: 1.5rem 0rem 2.5rem;
}


.contact_box .contact_details {
   display: flex;
   align-items: center;
   margin: 2rem 0;
   gap: 1.5rem;
   /* margin-bottom: 2rem; */
}

.contact_details i {
   display: inline-flex;
   background:var(--bg-colour);
   font-size: 3rem;
   padding: 1.2rem;
   border-radius: .6rem;
   margin-right: 1.5rem;
   color: var(--main-colour);
}

.contact_details .detail p:first-child {
   font-size: 1.8rem;
   color: var(--main-colour);
}

.contact_box form {
   /* flex-direction: column; */
   background: var(--second-bg-colour);
   padding: 2.5rem 3.5rem 3.5rem;
   border-radius: .8rem;
   text-align: center;
   gap: 1.5rem;
}

.contact_box .heading {
   font-size: 3.5rem;
   
}

.contact_box .field_box{
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 3rem;
}

.contact_box .field_box input, .contact_box .field_box textarea {
   background: transparent;
   border: .2rem solid var(--main-colour);
   border-radius: .6rem;
   padding: 1.5rem;
   font-size: 1.6rem;
   color: var(--white-colour);
}

.contact_box .field_box textarea {
   grid-column: 1 / -1;
   height: 26rem;
   resize: none;
}

.contact_box .field_box input:focus, .contact_box .field_box textarea:focus {
   border-color: var(--main-colour);
   box-shadow: 0 0 0 4px rgba(124, 240, 61, .12);
}

/* ===== Contact form fields ===== */
.field_box {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 18px;
}

.field {
   position: relative;
}

.field_full {
   grid-column: 1 / -1;
}

.field input,
.field textarea {
   width: 100%;
   border: 2px solid rgba(255, 80, 120, 0.55);
   background: rgba(15, 18, 24, 0.35);
   color: #fff;
   border-radius: 10px;
   padding: 18px 14px 14px;
   outline: none;
   transition: 0.2s ease;
}

.field textarea {
   min-height: 140px;
   resize: vertical;
   padding-top: 22px;
}

.field input:focus,
.field textarea:focus {
   border-color:var(--main-colour);
   box-shadow: 0 0 0 4px rgba(255, 80, 120, 0.15);
}

/* Floating label */
.field label {
   position: absolute;
   left: 14px;
   top: 16px;
   color: rgba(255, 255, 255, 0.6);
   font-size: 0.95rem;
   pointer-events: none;
   transition: 0.18s ease;
   background: transparent;
}

.field input:focus+label,
.field textarea:focus+label,
.field input:not(:placeholder-shown)+label,
.field textarea:not(:placeholder-shown)+label {
   top: 7px;
   font-size: 0.75rem;
   color: var(--main-colour);
}

/* Important: make :placeholder-shown work (no placeholder text needed) */
.field input,
.field textarea {
   placeholder: " start typing...";
}

/* Errors */
.field_error {
   display: block;
   margin-top: 6px;
   font-size: 0.8rem;
   color: rgba(255, 110, 140, 0.95);
   min-height: 16px;
}

.field.is_invalid input,
.field.is_invalid textarea {
   border-color: rgba(255, 70, 70, 1);
   box-shadow: 0 0 0 4px rgba(255, 70, 70, 0.12);
}

.field.is_valid input,
.field.is_valid textarea {
   border-color: rgba(80, 220, 140, 0.95);
   box-shadow: 0 0 0 4px rgba(80, 220, 140, 0.10);
}

/* Character counter */
.char_count {
   display: block;
   margin-top: 6px;
   font-size: 0.78rem;
   color: rgba(255, 255, 255, 0.45);
   text-align: right;
}

/* Copy email button */
.copy_email {
   background: transparent;
   border: none;
   color: rgba(255, 80, 120, 1);
   font: inherit;
   padding: 0;
   cursor: pointer;
   text-decoration: underline;
   text-underline-offset: 4px;
}

.copy_email:hover {
   opacity: 0.85;
}

/* Toast */
.toast {
   position: fixed;
   right: 18px;
   bottom: 18px;
   background: rgba(20, 24, 32, 0.92);
   border: 1px solid rgba(255, 80, 120, 0.35);
   color: #fff;
   padding: 12px 14px;
   border-radius: 12px;
   box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
   transform: translateY(10px);
   opacity: 0;
   pointer-events: none;
   transition: 0.25s ease;
}

.toast.show {
   transform: translateY(0);
   opacity: 1;
}

/* Button loading state */
.btn.is_loading {
   opacity: 0.85;
   cursor: wait;
}

.btn .spinner {
   display: inline-block;
   width: 14px;
   height: 14px;
   border: 2px solid rgba(255, 255, 255, 0.35);
   border-top-color: rgba(255, 255, 255, 1);
   border-radius: 999px;
   margin-right: 10px;
   vertical-align: -2px;
   animation: spin 0.8s linear infinite;
}

@keyframes spin {
   to {
      transform: rotate(360deg);
   }
}

/* Mobile */
@media (max-width: 760px) {
   .field_box {
      grid-template-columns: 1fr;
   }
}


.form_message {
   margin-top: 1rem;
   font-size: 1.4rem;
   line-height: 1.5;
   min-height: 2rem;
}

.form_message.sending {
   color: #aaa;
}

.form_message.success {
   color: #4ade80;
}

.form_message.error {
   color: #f87171;
}

#sendBtn:disabled {
   cursor: not-allowed;
   opacity: 0.7;
}