@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #e0f2fe;
    --second-bg-color: #bae6fd;
    --text-color: #0f172a;
    --main-color: #3b82f6;
    --hover-color: #60a5fa;
    --shadow-color: rgba(59, 130, 246, 0.18);
    --header-height: 6.4rem;
}

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

body,
button,
input,
textarea {
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
}

body {
    background: var(--bg-color);
    line-height: 1.6;
    padding-top: var(--header-height);
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    border: none;
    outline: none;
    background: none;
}

*::selection {
    background: var(--main-color);
    color: var(--bg-color);
}

section {
    padding: 8rem 1.6rem;
}

.heading {
    font-size: clamp(3rem, 8vw, 4.6rem);
    text-align: center;
    margin-bottom: 3.6rem;
}

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

.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1.5rem rgba(59, 130, 246, 0.35);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    font-weight: 600;
    letter-spacing: 0.08rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 1.6rem 2.4rem rgba(59, 130, 246, 0.28);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.6rem;
    background: rgba(224, 242, 254, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 0.1rem solid transparent;
    z-index: 1000;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.header.sticky {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1.6rem 3.2rem var(--shadow-color);
}

.logo {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
}

#menu-icon {
    font-size: 3rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    transition: background 0.3s ease;
    cursor: pointer;
}

#menu-icon:hover {
    background: rgba(59, 130, 246, 0.12);
}

.navbar {
    position: absolute;
    top: calc(100% + 1rem);
    left: 1.6rem;
    right: 1.6rem;
    display: none;
    flex-direction: column;
    gap: 1.6rem;
    padding: 2rem 2.4rem;
    background: var(--bg-color);
    border-radius: 1.6rem;
    box-shadow: 0 2.4rem 4.8rem rgba(15, 23, 42, 0.14);
}

.navbar.active {
    display: flex;
}

.navbar a {
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

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

/* Home */
.multiple-text {
    display: inline-block;
}

.home {
    display: grid;
    gap: 3.2rem;
    align-items: center;
    text-align: center;
}

.home-content h3 {
    font-size: clamp(2.2rem, 6vw, 2.8rem);
    font-weight: 600;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 1.8rem;
}

.home-content h1 {
    font-size: clamp(3.6rem, 9vw, 5.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.6rem;
}

.home-content p {
    font-size: 1.6rem;
    max-width: 58rem;
    margin: 0 auto 3rem;
}

.social-media {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    margin-bottom: 3rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.4rem;
    height: 4.4rem;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1.5rem rgba(59, 130, 246, 0.45);
}

.home-img {
    justify-self: center;
}

/* Hexagon */
.hexagon-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(70vw, 28rem);
    aspect-ratio: 1;
    filter: drop-shadow(0 2.4rem 3.6rem rgba(15, 23, 42, 0.25));
    transition: filter 0.3s ease;
}

.hexagon-container--hero {
    width: min(80vw, 32rem);
}

.hexagon-container--about {
    width: min(62vw, 26rem);
}

.hexagon {
    width: 100%;
    height: 100%;
    background: var(--main-color);
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 6rem rgba(255, 255, 255, 0.18);
    border: 0.4rem solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    transform: translateY(4%) perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hexagon--accent {
    background: #0ef;
}

.hexagon-image {
    width: 68%;
    clip-path: inherit;
    transform: translateY(4%) perspective(1000px) rotateX(6deg) rotateY(6deg);
    transition: transform 0.3s ease;
    filter: brightness(1.05) contrast(1.08);
    pointer-events: none;
}

.hexagon::before {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: inherit;
    background: linear-gradient(135deg, transparent 35%, rgba(255, 255, 255, 0.18) 55%, transparent 75%);
    pointer-events: none;
}

.hexagon:hover {
    transform: translateY(4%) perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.12);
}

.hexagon:hover .hexagon-image {
    transform: translateY(4%) perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.12);
}

/* About */
.about {
    display: grid;
    gap: 3.6rem;
    background: var(--second-bg-color);
    align-items: center;
    text-align: center;
}

.about-content h2 {
    font-size: clamp(3rem, 8vw, 4.6rem);
    margin-bottom: 1.2rem;
}

.about-content h3 {
    font-size: 2.4rem;
    margin-bottom: 1.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin-bottom: 3rem;
}

/* Skills */
.skills-container {
    display: grid;
    gap: 2.4rem;
}

.skills-category {
    background: var(--second-bg-color);
    padding: 2.4rem 2.2rem;
    border-radius: 1.8rem;
    border: 0.2rem solid rgba(59, 130, 246, 0.08);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.skills-category:hover {
    border-color: var(--main-color);
    transform: translateY(-4px);
}

.skills-category h3 {
    font-size: 2.1rem;
    margin-bottom: 1.8rem;
    text-align: center;
    color: var(--main-color);
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 0.8rem;
    background: var(--bg-color);
    border-radius: 0.6rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    width: 0;
    background: var(--main-color);
    border-radius: inherit;
    position: relative;
    transition: width 1.6s ease-in-out;
}

.skill-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Services */
.services-container {
    display: grid;
    gap: 2.4rem;
}

.services-box {
    background: var(--second-bg-color);
    padding: 3rem 2.4rem;
    border-radius: 2rem;
    text-align: center;
    border: 0.2rem solid rgba(59, 130, 246, 0.08);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.services-box:hover {
    border-color: var(--main-color);
    transform: translateY(-4px);
}

.services-box i {
    font-size: 6rem;
    color: var(--main-color);
    margin-bottom: 1.6rem;
}

.services-box h3 {
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
}

.services-box p {
    font-size: 1.5rem;
    margin-bottom: 2.4rem;
}

/* Projects */
.projects {
    background: var(--second-bg-color);
}

.projects-container {
    display: grid;
    gap: 2.4rem;
}

.projects-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 1.2rem 2.4rem rgba(15, 23, 42, 0.12);
}

.projects-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projects-box:hover img {
    transform: scale(1.08);
}

.projects-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 3rem;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.05), rgba(59, 130, 246, 0.85));
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.projects-box:hover .projects-layer {
    transform: translateY(0);
}

.projects-layer h4 {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

.projects-layer p {
    font-size: 1.5rem;
    color: var(--second-bg-color);
}

.projects-layer div {
    display: flex;
    gap: 1.2rem;
}

.projects-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    background: var(--text-color);
    color: var(--second-bg-color);
    transition: background 0.3s ease, transform 0.3s ease;
}

.projects-layer a:hover {
    background: var(--main-color);
    transform: translateY(-2px);
}

/* Contact */
.contact form {
    width: min(100%, 60rem);
    margin: 0 auto;
    display: grid;
    gap: 1.6rem;
}

.contact form .input-box {
    display: grid;
    gap: 1.6rem;
}

.contact form input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: 0.9rem;
    transition: box-shadow 0.3s ease;
}

.contact form input:focus,
.contact form textarea:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.3);
}

.contact form textarea {
    resize: none;
    min-height: 14rem;
}

.contact form .btn {
    justify-self: center;
    cursor: pointer;
}

/* Footer */
.footer {
    display: grid;
    gap: 1.6rem;
    justify-items: center;
    padding: 2.4rem 1.6rem 3.2rem;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.4rem;
    text-align: center;
}

.footer-iconTop {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.footer-iconTop.visible {
    opacity: 1;
    pointer-events: auto;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    border-radius: 0.9rem;
    background: var(--main-color);
    color: var(--second-bg-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-iconTop a:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 2rem rgba(59, 130, 246, 0.3);
}

.footer-iconTop i {
    font-size: 2.2rem;
}

/* Media queries */
@media (min-width: 48em) {
    :root {
        --header-height: 7rem;
    }

    body {
        padding-top: var(--header-height);
    }

    .header {
        padding: 1.8rem 5%;
    }

    #menu-icon {
        display: none;
    }

    .navbar {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 3.2rem;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .navbar a {
        position: relative;
        font-size: 1.5rem;
    }

    .navbar a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -0.8rem;
        width: 100%;
        height: 0.2rem;
        background: var(--main-color);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .navbar a:hover::after,
    .navbar a.active::after {
        transform: scaleX(1);
    }

    section {
        padding: 9rem 5% 5rem;
    }

    .home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: left;
        column-gap: 4rem;
    }

    .home-content p {
        margin-left: 0;
        margin-right: 0;
    }

    .home-img {
        justify-self: end;
    }

    .hexagon-container--hero {
        width: min(48vw, 36rem);
    }

    .about {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: left;
        column-gap: 4rem;
    }

    .about-content h2 {
        text-align: left;
    }

    .about-content p {
        margin-bottom: 3.2rem;
    }

    .skills-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact form {
        width: min(90%, 70rem);
    }

    .contact form .input-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer {
        grid-template-columns: repeat(2, max-content);
        align-items: center;
        justify-content: space-between;
        padding: 2.8rem 5%;
        text-align: left;
    }

    .footer-text p {
        text-align: left;
    }
}

@media (min-width: 62em) {
    :root {
        --header-height: 7.4rem;
    }

    body {
        padding-top: var(--header-height);
    }

    html {
        font-size: 64%;
    }

    section {
        padding: 10rem 8% 6rem;
    }

    .home {
        column-gap: 6rem;
    }

    .hexagon-container--hero {
        width: min(40vw, 40rem);
    }

    .hexagon-container--about {
        width: min(32vw, 30rem);
    }

    .skills-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .services-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .projects-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 75em) {
    html {
        font-size: 66%;
    }

    section {
        padding: 12rem 10% 8rem;
    }

    .home-content h1 {
        font-size: 6rem;
    }

    .heading {
        font-size: 5rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
