/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins",sans-serif;

}

/* CSS Variables */
:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: white;
    --main-color: #00ffee;
}

/* General styling */
html {
    font-size: 60%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif; 
}

/* Header styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    padding: 4rem 12% 4rem;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.logo {
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none; 
    font-family: 'Poppins', sans-serif; 
    font-size: large;
}

.logo:hover {
    transform: scale(1.1);
}

.logo span {
    text-shadow: 0 0 25px var(--main-color);
    font-family: 'Poppins', sans-serif;
}

.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    text-decoration: none; 
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
#menu-icon{
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}

/* Home section styles */
section {
    min-height: 100vh;
    padding: 10rem 12% 10rem;
}

.home {
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
     gap: 111rem; /* Adjust gap as needed */
     padding-top: 1rem; 
     
}

.home-content {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    justify-content: space-between;
    margin-top: 5rem;
}

.text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-content p{
    font-size: 200%;
    font-family: 'Courier New', Courier, monospace;
}

span {
    color: var(--main-color);
}

.logo span{
    color: var(--main-color);

}

.home-content h3 {
    margin-bottom: 3rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content h1 {
    font-size: 7rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}

.home-img {
    flex: 1;
    display: flex;
    border-radius: 50%;
    align-items: center;
    justify-content:  flex-end;
    margin-top: 0;
    max-width: 30%;
}

.home-img img {
    
    /* position: relative; */
    width: 15vw; /* Adjust the size as needed */
    top: 3rem;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.home-img img:hover{
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #0ef;
    border-radius: 50%;
    font-size: 20px;
    color: #0ef;
    text-decoration: none;
    margin: 30px 15px 30px;
}

.home-sci a:hover {
    background: #0ef;
    color: #081b29;
    box-shadow: 0 0 20px #0ef;
}
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--main-color);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Remove these selectors as they are not needed anymore */
/* .btn-group a:nth-of-type(2) {
    background-color: black;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px transparent;
}

.btn-group a:nth-of-type(2):hover {
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
    color: black;
} */

.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.text-animation span {
    position: relative;
}

.text-animation span::before {
    content: "Web Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}

.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 2rem 5%;
    }

    .navbar a {
        margin-left: 0;
        margin-top: 1rem;
    }

    .home {
        padding-top: 8rem; /* Adjust padding to account for smaller header height */
    }

    .home-content {
        align-items: center;
        text-align: center;
    }
    .text-content {
        margin-bottom: 2rem;
    }

    .home-img {
        justify-content: center;
        max-width: 80%; /* Allow the image to take more space in smaller screens */
    }
}

@keyframes cursor {
    to {
        border-left: 2px solid var(--main-color);
    }
}

@keyframes words {
    0%,
    20% {
        content: " C Programmer";
    }
    21%,
    40% {
        content: " Web Designer";
    }
    41%,
    60% {
        content: " Data Handler";
    }
    61%,
    80% {
        content: " CS Engineer";
    }
    81%,
    100% {
        content: " Game Tester";
    }
}

@keyframes typing {
    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90% {
        width: 0;
    }
    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85% {
        width: calc(100% + 8px);
    }
}

.heading{
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}
.education{
    padding: 100px 15px;
    background: var(--second-bg-color);
}
.education h2{
    margin-bottom: 5rem;
}

.timeline-items{
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}
.timeline-items ::before{
    content: "";
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);
}

.timeline-item{
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}
.timeline-item:last-child{
    margin-bottom: 0;
}
.timeline-item:nth-child(odd){
    padding-right: calc(50% + 30px);
    text-align: right;
}
.timeline-item:nth-child(even){
    padding-left: calc(50% + 30px);
    
}
.timeline-dot{
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}

.timeline-date{
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;
}
.timeline-content{
    background-color: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--main-color);
    padding: 30px 50px;
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    cursor: pointer;
    transition: 0.3 ease-in-out;
}
.timeline-content :hover{
    transform: scale(1.03);
    box-shadow: 0 0 25px var(--main-color);
}

.timeline-content h3{
    font-size: 20px;
    color: white;
    margin: 0 0 10px;
    font-weight: 500;
}

.timeline-content p{
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 300;
    line-height: 22px;
}
::-webkit-scrollbar{
    width: 15px
}
::-webkit-scrollbar-thumb{
    background-color: var(--main-color);
}
::-webkit-scrollbar-track{
    background-color: var(--bg-color);
    width: 50px;
}
#services {
    color: var(--text-color);
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.sub-title {
    text-align: center;
    font-size: 60px;
    padding-bottom: 10px;
}

.sub-title span {
    color: var(--main-color);
}

.container {
    padding: 90px;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(259px, 1fr));
    grid-gap: 48px;
    margin-top: 50px;
}

.services-list div {
    background-color: var(--second-bg-color);
    padding: 40px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    transition: background 0.5s, transform 0.5s;
    box-shadow: 1px 1px 20px var(--main-color), 1px 1px 40px var(--main-color);
}

.services-list div i {
    font-size: 50px;
    margin-bottom: 30px;
}

.services-list div h2 {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
}

.services-list div a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 12px;
    margin-top: 20px;
    display: inline-block;
}

.read {
    display: inline-block;
    padding: 12px 28px;
    background: var(--main-color);
    border-radius: 46px;
    font-size: 16px;
    color: var(--bg-color);
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.read:hover {
    box-shadow: 0 0 5px var(--main-color), 0 0 25px var(--main-color), 0 0 50px var(--main-color), 0 0 100px
}
.services-list div:hover {
    transform: translateY(-18px);
}


section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 50px;
  }
  
  .container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
  }
  
  .skills,
  .professional-skills {
    width: 45%;
  }
  
  .heading {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .skill,
  .radial-bar {
    margin-bottom: 20px;
  }
  
  .skill i,
  .radial-bar i {
    font-size: 30px;
    margin-right: 10px;
  }
  
  .progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
  }
  
  .progress {
    height: 100%;
    background-color: #0ef;
    width: 0;
    transition: width 2s ease-out;
    animation: fillAnimation 2s forwards;
  }
  
  .circle .bar {
    transition: stroke-dashoffset 2s ease-out;
  }

  @keyframes fillAnimation {
    from { width: 0; }
    to { width: var(--percentage); }
  }
  
  .radial-bar {
    text-align: center;
  }
  
  .circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 5px;
    position: relative;
  }
  
  .circle svg {
    width: 100%;
    height: 100%;
  }
  
  .circle circle {
    fill: none;
    stroke-width: 8;
    stroke: #ccc;
  }
  
  .circle .bar {
    stroke: #0ef;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    animation: fillRadial 2s forwards;
  }
  
  @keyframes fillRadial {
    from {
      stroke-dashoffset: 251.2;
    }
    to {
      stroke-dashoffset: calc(251.2 - (251.2 * var(--percentage) / 100));
    }
  }
  
  .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #0ef;
  }
  
  .text {
    font-size: 1.2rem;
    font-weight: bold;
  }
  

/* Contact form section */
.contact-form {
    padding: 50px;
    background: var(--second-bg-color);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
    border: 2px solid var(--main-color);
}

.contact-form .heading {
    font-size: 3rem;
    margin-bottom: 30px;
    color: #fff;
    text-transform: uppercase;
}

.contact-form .heading .glow {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color), 0 0 20px var(--main-color);
}

.contact-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--main-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    box-shadow: 0 0 10px var(--main-color);
    outline: none;
}

.contact-form .form-group button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--main-color);
    color: var(--bg-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form .form-group button:hover {
    background: #fff;
    color: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 30px;
        padding-right: 30px;
        text-align: left;
    }

    .timeline-items::before {
        left: 0;
    }

    .timeline-dot {
        left: -6px;
    }
}