@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&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;
}

:root {
    --bg-color: #000000;
    --second-bg-color: #161616;
    --text-color: #fff;
    --main-color:  gold; 
}

html {
    font-size: 68.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

html::-webkit-scrollbar {
    width: 0.8rem;
}

html::-webkit-scrollbar-track {
    background: var(--bg-color);
}

html::-webkit-scrollbar-thumb {
    background: var(--main-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color: var(--main-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

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

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-left: 3rem;
    font-weight: 500;
    transition: 0.3s ease;
    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: 3rem;
    color: var(--main-color);
    display: none;
    cursor: pointer;
}

@media (max-width: 995px) {
    .menu-icon {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        border-left: 3px solid var(--main-color);
        border-bottom: 3px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        padding: 1rem 3%;
        background-color: var(--second-bg-color);
        display: none;
    }
    .navbar.active {
        display: block;
    }
    .navbar a {
        display: block;
        font-size: 1.8rem;
        margin: 2rem 0;
    }
    .navbar a:hover,
    .navbar a.active {
        padding: 0.8rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid var(--main-color);
    }
}

section {
    min-height: 100vh;
    padding: 4rem 9% 4rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    background: var(--bg-color);
}

.home .home-content h1 {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.home-content h3 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-img {
    border-radius: 50%;
}

.home-img img {
    position: relative;
    width: 28vw;
    max-width: 350px;
    border-radius: 50%;
    box-shadow: 0 0 40px var(--main-color);
    cursor: pointer;
}

.home-img img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--main-color);
}

.home-content p {
    font-size: 1.6rem;
    font-weight: 400;
}

.social-icon a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    font-size: 1.8rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 2rem 1rem 2rem 0;
    transition: 0.3s ease;
}

.social-icon a:hover {
    color: black;
    transform: scale(1.2) translateY(-5px);
    background: var(--main-color);
    box-shadow: 0 0 20px var(--main-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: var(--bg-color);
    border-radius: 4rem;
    font-size: 1.4rem;
    color: white;
    border: 2px solid var(--main-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    background-color: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
}

.typing-text {
    font-size: 3rem;
    font-weight: 600;
    min-width: 260px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .typing-text {
        font-size: 2.2rem;
        min-width: 180px;
    }
}

@media (max-width: 1000px) {
    .home {
        gap: 3rem;
    }
}

@media (max-width: 995px) {
    .home {
        flex-direction: column;
        margin: 4rem 3rem;
    }
    .home .home-content h3 {
        font-size: 3rem;
    }
    .home-content h1 {
        font-size: 4.5rem;
    }
    .home-img img {
        width: 65vw;
        margin-top: 3rem;
    }
}

.services {
    background: var(--second-bg-color);
}

.heading {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Flexible grid */
    gap: 2rem;
    justify-items: center;
    align-items: center;
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
    background-color: var(ma);
    border-radius: 1rem;
}

.service-box {
    padding: 1.2rem;
    border-radius: 1.5rem;
    background: var(--main-color);
    box-shadow: 0 4px 10px var(--main-color);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
    min-height: 220px; /* Adjusted for content */
}

.service-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--bg-color);
    background: transparent;
    border: 1px solid var(--main-color);
}

.service-box .service-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
}

.service-info h4 {
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: white;
}

.service-info p {
    font-size: 1.8rem;
    font-weight: 400;
    color: white;
}

@media (max-width: 768px) {
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }
    .service-info h4 {
        font-size: 2.4rem;
    }
    .service-info p {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.2rem;
    }
}

.skills {
    background: var(--bg-color);
}

.skills .container {
    background-color: #1e1e2f;
    color: var(--text-color);
    border-radius: 1rem;
    padding: 2rem;
    width: 95%;
    max-width: 1200px;
    margin: auto;
    margin-top: 2rem;
}

.skills .container .row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, auto);
    gap: 2rem;
    justify-items: center;
    align-items: center;
}

.skills .container .bar {
    padding: 1.2rem;
    border-radius: 1.5rem;
    background: var(--bg-color);
    box-shadow: 0 4px 10px var(--main-color);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.skills .container .bar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--main-color);
}

.skills .container .bar .info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.skills .container .bar .info img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.skills .container .bar .info span {
    font-size: 1.8rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .skills .container .row {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 1.5rem;
    }
    .skills .container .bar .info img {
        width: 55px;
        height: 55px;
    }
    .skills .container .bar .info span {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .skills .container .row {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.2rem;
    }
    .skills .container .bar .info img {
        width: 50px;
        height: 50px;
    }
    .skills .container .bar .info span {
        font-size: 1.4rem;
    }
}

.education {
    background: var(--second-bg-color);
}

.education .timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.education .timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: rgb(90, 64, 64);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    z-index: -2;
}

.education .container {
    padding: 8px 30px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.education .container::after {
    content: '\f501'; /* Font Awesome icon for education */
    position: absolute;
    width: 20px;
    height: 20px;
    line-height: 20px;
    right: -14px;
    background-color: #fff;
    border: 3px solid var(--main-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    font-size: 1.5rem;
    text-align: center;
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* Ensure solid icon */
    color: rgb(90, 64, 64);
}

.education .left {
    left: 0;
}

.education .right {
    left: 50%;
}

.education .left::before {
    content: '';
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 25px;
    border: medium solid var(--main-color);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--main-color);
}

.education .right::before {
    content: '';
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 25px;
    border: medium solid var(--main-color);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--main-color) transparent transparent;
}

.education .right::after {
    left: -13px;
}

.education .content {
    background: var(--main-color);
    position: relative;
    border-radius: 6px;
    padding: 1.2rem;
}

.education .content .tag {
    font-size: 1.4rem;
    padding-bottom: 0.4rem;
}

.education .content .decs {
    margin-left: 1.2rem;
    padding-bottom: 0.8rem;
}

.education .content .decs h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: black;
}

.education .content .decs p {
    font-size: 1.6rem;
    font-weight: 500;
    color: black;
}

@media screen and (max-width: 600px) {
    .education .timeline {
        margin-top: 1.5rem;
    }
    .education .timeline::after {
        left: 28px;
    }
    .education .container {
        width: 100%;
        padding-left: 7rem;
        padding-right: 1.5rem;
    }
    .education .container::after {
        left: 14px;
    }
    .education .container::before {
        left: 58px;
        border: medium solid var(--main-color);
        border-width: 8px 8px 8px 0;
        border-color: transparent var(--main-color) transparent transparent;
    }
    .education .left::after {
        left: 14px;
    }
    .education .right::after {
        left: 14px;
    }
    .education .right {
        left: 0%;
    }
}

.contact h2 {
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

.contact form {
    max-width: 65rem;
    margin: 1rem auto;
    margin-bottom: 2.5rem;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.5rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 0.8rem;
    border: 2px solid var(--main-color);
    margin: 0.8rem 0;
    resize: none;
}

.contact form .btn {
    margin-top: 1.5rem;
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 30px 0;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .social {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-bottom: 20px;
    color: black;
}

.footer .social a {
    font-size: 2.2rem;
    color: black;
    border: 2px solid black;
    width: 38px;
    height: 38px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.footer .social a:hover {
    transform: scale(1.2) translateY(-5px);
    background: black;
    color: var(--main-color);
}

.footer ul {
    margin-top: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a {
    color: black;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    border-bottom: 3px solid black;
}

.footer ul li {
    display: inline-block;
    padding: 0 12px;
}

.footer .copyright {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    color: black;
}

@media (max-width: 1285px) {
    html {
        font-size: 60%; /* Slightly larger for consistency */
    }
}