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

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    list-style: none;
    scroll-behavior: smooth;
    text-decoration: none;
}

img, video, svg {
    max-width: 100%;
    height: auto;
}

:root{
    --text-color:#e2e8f0;
    --hover-color: #22d3ee;
    --accent-purple: #7c3aed;
    --bg-color: #04060d;
    --secon-bg-color: #0c1422;
    --big-font: clamp(1.85rem, 4vw, 2.8rem);
    --norma-font: clamp(1.25rem, 2.5vw, 2rem);
    --neon-box-shadow: 0 0 .5rem #22d3ee;
    --h2-font: clamp(1.6rem, 3.5vw, 2.4rem);
    --section-pad-x: clamp(1rem, 5vw, 10%);
    --section-pad-y: clamp(3rem, 8vw, 6.25rem);
    --font-neon-text-shadow: 0 0 10px rgb(34, 211, 238),
    0 0 20px rgb(34, 211, 238),
    0 0 30px rgb(34, 211, 238),
    0 0 40px rgb(34, 211, 238);
}
html {
    -webkit-text-size-adjust: 100%;
}
body{
    font-family: "Poppins", sans-serif;
    background: radial-gradient(rgb(15,39,51),rgb(6,10,20),rgb(4,6,13));
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}
main {
    flex: 1;
}
body > footer {
    margin-top: auto;
}

header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px var(--section-pad-x);
    background: rgba(6,10,20,.55);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: relative;
    z-index: 1000;
}
.logo{
    font-size: clamp(1.05rem, 2.5vw, 1.375rem);
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
}
span{
    color: var(--hover-color);
}
.navlist{
    display: flex;
}
.navlist a{
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 20px;
}

.navlist a:hover{
    color: var(--hover-color);
    text-shadow: 0 0 8px rgba(34, 211, 238, .6);
    transition: color .3s, text-shadow .3s;
}
#menu-icon{
    font-size: 1.8rem;
    z-index: 10001;
    cursor: pointer;
    margin-left: 25px;
    background: var(--hover-color);
    border-radius: 3px;
    color: var(--secon-bg-color);
    display: none;
}

section{
    padding: var(--section-pad-y) var(--section-pad-x);
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.home{
    min-height: 100vh;
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    grid-gap: clamp(1.5rem, 4vw, 4em);
}
.home-content{
    max-width: 600px;
    width: 100%;
}
.home-content h1{
    font-size: var(--big-font);
    font-weight: 700;
}

.change-text{
    font-size: 1.3rem;
    font-weight: 600;
}
.change-text h3{
    display: inline-flex;
    margin: 0;
    vertical-align: top;
}
.change-text h3 .word{
    position: absolute;
    display: flex;
    opacity: 0;
}

.change-text h3 .word .letter{
    transform-origin: center center 60px;
}
.change-text h3 .word .letter.out{
    transform: rotateX(90deg);
    transition: 0.32s cubic-bezier(0.6,0,0.7,0.2);
}

.change-text h3 .word .letter.in{
    transition: 0.38s ease;
}
.change-text h3 .word .letter.behind{
    transform: rotateX(-90deg);
}
.home-content{
    color: #f5f5f5;
    line-height: 1.6;
}
.info-box{
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin:1rem 0 2rem;
}

.info-box h5{
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.info-box span{
    font-size: .9rem;
    color: white;
}
.btn-box{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    max-width: 520px;
}
.btn-box a.btn{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 160px;
    max-width: 230px;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    background: var(--hover-color);
    color: var(--bg-color);
    font-size: clamp(0.78rem, 1.6vw, 0.92rem);
    letter-spacing: 0.4px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transition: .6s;
    box-shadow:var(--neon-box-shadow);
    border-radius: 5px;
    position: relative;overflow: hidden;
    z-index: 1;
    border: 2px solid var(--hover-color);
}
a.btn:hover{
    color: var(--hover-color);
}
a.btn::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background: var(--bg-color);
    width: 0;
    height: 100%;
    z-index: -1;
    transition: .4s;
}

a.btn:hover::before{
    width: 100%;
}

.social-icons{
    margin-top: 8rem;
    display: flex;
    justify-content: space-between;
    width: 220px;
    height: 40px;
}

.social-icons a{
    display: inline-flex;
    width: 50px;
    height: 100%;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    color: #f5f5f5;
    border: 2px solid #f5f5f5;
    transition: .6s;
    box-shadow: 0 0 0.3rem #f5f5f5;
    border-radius: 5px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.social-icons a i{
    font-size: 1.3rem;
}

.social-icons a:hover{
    color: var(--bg-color);
}
.social-icons a::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: #f5f5f5;
    transition: .6s;
    z-index: -1;
}

.social-icons a:hover::before{
    width: 100%;
}

.home-image{
    position: relative;
}
.img-box{
    text-align: center;
}
.img-box img{
    width: 100%;
    max-width: 1080px;
    height: auto;
    position: relative;
    top: -120px;
}

.liquid-shape{
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: -50px;
}
.liquid-shape:nth-child(2){
    filter: blur(50px);
}

/* Skills section */
.skills{
    background: transparent;
    padding-top: 30px;
}
.skill-main{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-row-gap: 30px;
    grid-column-gap: clamp(1.25rem, 4vw, 50px);
}
.skill-main .btn-box {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}
.skill-bar{
    margin-bottom: 0.8rem;
}
.main-text h2{
    text-align: left;
}
.main-text p{
    text-align: left;
}

.skill-left h3,
.skill-right h3 {
    margin-bottom: var(--norma-font);
    font-size: 20px;
}

.skill-left h3{
    margin-bottom: var(--norma-font);
    text-align: left;
}

.skill-right h3{
    margin-bottom: var(--norma-font);
    text-align: center;
}
.skill-left .skill-bar .info{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.skill-left .skill-bar .bar{
    width: 100%;
    height: 10px;
    border-radius: 20px;
    margin-top: 10px;
    position: relative;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
}
.skill-bar .bar span{
    width: 50%;
    height: 100%;
    position: absolute;
    left: 0;
    background-color: var(--hover-color);
    border-radius: 25px;
    box-shadow: var(--neon-box-shadow);
}

/* Skill right */
.professional{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}
.box{
    position: relative;
    margin: 10px 0;
    flex: 1 1 15rem;
}

.box .text{
    text-align: center;
    color: white;
    font-size: 1rem;
}
.box .text span {
    font-weight: 400;
    letter-spacing: 1px;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.box .text small{
    display: block;
    font-weight: 600;
}

.circle{
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.circle .points{
    width: 2px;
    height: 10px;
    background-color: var(--bg-color);
    position: absolute;
    border-radius: 3px;
    transform: rotate(calc(var(--i)*var(--rot))) translateY(-45px);
    animation: glow 0.04s linear forwards;
    animation-delay: calc(var(--i)*0.05s);
}
footer{
    background: transparent;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.5rem var(--section-pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}
footer p{
    color: rgba(203,213,225,.7);
    font-size: clamp(0.75rem, 2vw, 0.95rem);
}

/* Responsive */
@media (max-width: 1200px) {
    .navlist a{
        padding: 10px 14px;
        font-size: 0.95rem;
    }
}

@media (max-width: 991px) {
    header,
    header.sticky{
        padding: 15px var(--section-pad-x);
    }
    footer{
        padding: 15px var(--section-pad-x);
        justify-content: center;
        text-align: center;
    }
    section{
        padding: var(--section-pad-y) var(--section-pad-x);
    }
    .navlist a{
        padding: 8px 12px;
    }
    .home-content{
        margin-top: 2rem;
    }
    .social-icons{
        margin-top: 2rem;
    }
    .skill-main{
        grid-template-columns: 1fr;
    }
    .btn-box {
        justify-content: center;
        max-width: 100%;
        margin-inline: auto;
    }
    .btn-box a.btn {
        flex: 1 1 140px;
        max-width: 200px;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    #menu-icon{
        display: block;
        transition: all .4s ease;
        margin-left: 12px;
        flex-shrink: 0;
    }
    #menu-icon.bx-x{
        transform: rotate(-180deg);
    }
    .navlist{
        z-index: 999;
        display: flex;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background: rgba(4, 6, 13, .98);
        text-align: left;
        padding: 0 var(--section-pad-x);
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 16px 40px rgba(0,0,0,.45);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .navlist a{
        display: block;
        padding: 0.85rem 0;
        font-size: 1rem;
    }
    .navlist.open{
        max-height: 420px;
        opacity: 1;
        pointer-events: auto;
        padding: 0.75rem var(--section-pad-x) 1.25rem;
    }
    .home{
        grid-template-columns: 1fr;
    }
    .home-image{
        margin-bottom: 3rem;
    }
    .img-box img{
        top: 0;
        max-width: 100%;
    }
    .main-text{
        flex-direction: column-reverse;
    }
    .main-text h2{
        text-align: center;
        font-size: var(--h2-font);
    }
    .main-text p{
        text-align: left;
    }
    .skill-left,
    .skill-right {
        text-align: center;
        max-width: 100%;
    }
    .skill-bar,
    .professional .box {
        width: 100%;
        margin-bottom: 20px;
    }
    .skill-bar .info,
    .professional .text {
        text-align: center;
    }
    .professional{
        grid-template-columns: 1fr;
    }
    .btn-box {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 0.65rem;
    }
    .btn-box a.btn {
        flex: 1 1 calc(50% - 0.4rem);
        width: auto;
        max-width: none;
        min-width: 0;
        min-height: 2.25rem;
        padding: 0.5rem 0.65rem;
        font-size: 0.78rem;
        letter-spacing: 0.2px;
    }
    .competencies {
        justify-content: center;
        gap: 0.5rem;
    }
    .competency {
        width: calc(50% - 1.25rem);
        min-width: 110px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .logo{
        font-size: 1rem;
        letter-spacing: 0.5px;
    }
    .btn-box {
        flex-direction: column;
        align-items: center;
    }
    .btn-box a.btn {
        width: 100%;
        max-width: 260px;
        flex: 0 0 auto;
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }
    .competency {
        width: 100%;
        max-width: none;
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.75rem;
        margin: 6px 0;
    }
    .competency i {
        margin-bottom: 0;
        font-size: 28px;
    }
    .circle {
        height: 100px;
    }
}

.port-box:hover .port-content{
    opacity: 1;
}

.port-box:hover .port-image img{
    transform: scale(1.5);
}

/* Skill bar widths and animations */
.skill-bar .bar .python{ width: 80%; animation: python 1s; }
.skill-bar .bar .java{ width: 60%; animation: java 2s; }
.skill-bar .bar .cplus{ width: 60%; animation: cplus 3s; }
.skill-bar .bar .sql{ width: 60%; animation: sql 4s; }
.skill-bar .bar .html{ width: 40%; animation: html 5s; }
.skill-bar .bar .vhdl{ width: 40%; animation: vhdl 6s; }
.skill-bar .bar .aws{ width: 60%; animation: aws 1s; }
.skill-bar .bar .docker{ width: 60%; animation: docker 2s; }
.skill-bar .bar .azure{ width: 40%; animation: azure 3s; }
.skill-bar .bar .flask{ width: 40%; animation: flask 4s; }
.skill-bar .bar .charm{ width: 80%; animation: charm 1s; }
.skill-bar .bar .vs{ width: 80%; animation: vs 2s; }
.skill-bar .bar .postman{ width: 60%; animation: postman 3s; }
.skill-bar .bar .git{ width: 60%; animation: git 4s; }

@keyframes python{ 0%{ width: 0%; } 100%{ width: 80%; } }
@keyframes java{ 0%{ width: 0%; } 100%{ width: 60%; } }
@keyframes cplus{ 0%{ width: 0%; } 100%{ width: 60%; } }
@keyframes sql{ 0%{ width: 0%; } 100%{ width: 60%; } }
@keyframes html{ 0%{ width: 0%; } 100%{ width: 40%; } }
@keyframes vhdl{ 0%{ width: 0%; } 100%{ width: 40%; } }
@keyframes aws{ 0%{ width: 0%; } 100%{ width: 60%; } }
@keyframes docker{ 0%{ width: 0%; } 100%{ width: 60%; } }
@keyframes azure{ 0%{ width: 0%; } 100%{ width: 40%; } }
@keyframes flask{ 0%{ width: 0%; } 100%{ width: 40%; } }
@keyframes charm{ 0%{ width: 0%; } 100%{ width: 80%; } }
@keyframes vs{ 0%{ width: 0%; } 100%{ width: 80%; } }
@keyframes git{ 0%{ width: 0%; } 100%{ width: 40%; } }
@keyframes postman{ 0%{ width: 0%; } 100%{ width: 40%; } }

@keyframes glow{
    0%{ background: var(--bg-color); box-shadow: none; }
    100%{ background: var(--hover-color); box-shadow: var(--neon-box-shadow); }
}

.skill-right {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.skill-right h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
}

.competencies {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.competency {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    max-width: 100%;
    margin: 10px;
    padding: 15px;
    background: rgba(12,20,34,.7);
    border: 1px solid rgba(34,211,238,.25);
    border-radius: 10px;
    transition: transform 0.3s ease, border-color .3s ease, box-shadow .3s ease;
}

.competency:hover {
    transform: scale(1.05);
    border-color: rgba(34,211,238,.6);
    box-shadow: 0 15px 35px -12px rgba(34,211,238,.45);
}

.competency i {
    font-size: 36px;
    margin-bottom: 10px;
    color: #22d3ee;
}

.competency span {
    text-align: center;
    font-weight: bold;
}

.competency span {
    color: #e2e8f0;
}

.competency:nth-child(2n) i { color: #a78bfa; }
.competency:nth-child(2n):hover { border-color: rgba(167,139,250,.6); box-shadow: 0 15px 35px -12px rgba(124,58,237,.45); }
