/* Fonts are loaded via <link> in index.html (no render-blocking @import) */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}
html{
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body{
    overflow-x: clip;           /* safety net: never allow sideways scroll */
    min-height: 100vh;
}
img{
    max-width: 100%;
    height: auto;
}

/* custom scroll bar */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: #f1f1f1; }
::-webkit-scrollbar-thumb{ background: #888; }
::-webkit-scrollbar-thumb:hover{ background: #555; }

/* shared section styling */
section{
    padding: 100px 0;
}
/* skip rendering of off-screen sections until they are near the viewport */
.about, .services, .skills, .lectures, .contact{
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}
.max-width{
    max-width: 1300px;
    padding: 0 80px;
    margin: auto;
}
.about .about-content,
.skills .skills-content,
.contact .contact-content{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
section .title{
    position: relative;
    text-align: center;
    font-size: 40px;
    font-weight: 500;
    margin-bottom: 60px;
    padding-bottom: 20px;
    font-family: 'Ubuntu', sans-serif;
}
section .title::before{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 180px;
    height: 3px;
    background: #111;
    transform: translateX(-50%);
}
section .title::after{
    position: absolute;
    bottom: -8px;
    left: 50%;
    font-size: 20px;
    color: crimson;
    padding: 0 5px;
    background: #fff;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* ---------- navbar ---------- */
.navbar{
    position: fixed;
    width: 100%;
    z-index: 999;
    padding: 30px 0;
    font-family: 'Ubuntu', sans-serif;
    transition: padding .3s ease, background-color .3s ease;
}
.navbar.sticky{
    padding: 15px 0;
    background: crimson;
}
.navbar .max-width{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar .logo a{
    color: #fff;
    font-size: 35px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.navbar .logo a span{
    color: crimson;
    transition: color .3s ease;
}
.navbar.sticky .logo a span{ color: #fff; }
.navbar .menu li{
    list-style: none;
    display: inline-block;
}
.navbar .menu li a{
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin-left: 25px;
    transition: color .3s ease;
}
.navbar .menu li a:hover{ color: crimson; cursor: pointer; }
.navbar.sticky .menu li a:hover{ color: #fff; }

.menu-btn{
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    z-index: 1000;
    padding: 6px;
}
.menu-btn i, .menu-btn i::before{ font-family: "Font Awesome 6 Free"; font-weight: 900; }
.menu-btn i.active::before{ content: "\f00d"; }

.scroll-up-btn{
    position: fixed;
    height: 45px;
    width: 42px;
    background: crimson;
    right: 30px;
    bottom: 10px;
    text-align: center;
    line-height: 45px;
    color: #fff;
    z-index: 9999;
    font-size: 30px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, bottom .3s ease;
}
.scroll-up-btn.show{
    bottom: 30px;
    opacity: 1;
    pointer-events: auto;
}
.scroll-up-btn:hover{ filter: brightness(90%); }

/* ---------- home ---------- */
.home{
    display: flex;
    background: url("./stock.webp") no-repeat center / cover;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100svh;
    color: #fff;
    font-family: 'Ubuntu', sans-serif;
}
.home .max-width{
    width: 100%;
    display: flex;
}
.home .home-content .text-1{ font-size: 20px; }
.home .home-content .text-2{
    font-size: clamp(34px, 11vw, 75px);
    font-weight: 600;
    margin-left: -3px;
    line-height: 1.15;
}
.home .home-content .text-3{
    font-size: clamp(20px, 5.6vw, 40px);
    margin: 5px 0;
}
.home .home-content .text-3 span{
    color: crimson;
    font-weight: 500;
}
.classbox{
    position: relative;
    width: 220px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.5);
    overflow: hidden;
    border-radius: 25px;
    margin-top: 45px;
    cursor: pointer;
}
.classbox::before{
    content: '';
    position: absolute;
    width: 68px;
    height: 500%;
    background: linear-gradient(#00ccff,#d400d4);
    animation: animate-rotate 4s linear infinite;
}
.classbox::after{
    content: '';
    position: absolute;
    inset: 4px;
    background: #0e1538;
    border-radius: 20px;
}
@keyframes animate-rotate{
    to{ transform: rotate(360deg); }
}
.classbox a{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 18px;            /* keeps text away from the borders */
    text-align: center;         /* wrapped lines are centred, not left-aligned */
    color: #fff;
    font-size: 1.25em;          /* fits inside the box */
    font-weight: 500;
    line-height: 1.25;
    z-index: 10;
}

/* ---------- about ---------- */
.about .title::after{ content: "who i am"; }
.about .about-content .left{ width: 45%; }
.about .about-content .left img{
    width: min(400px, 100%);
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}
.about .about-content .right{ width: 55%; }
.about .about-content .right .text{
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 10px;
}
.about .about-content .right .text span{ color: crimson; }
.about .about-content .right p{ text-align: justify; }
.about .about-content .right a{
    display: inline-block;
    color: crimson;
    font-size: 20px;
    font-weight: 500;
    padding: 10px 30px;
    margin-top: 20px;
    border-radius: 6px;
    border: 2px solid crimson;
    transition: color .3s ease-in-out, background-color .3s ease-in-out;
}
.about .about-content .right a:hover{
    color: #fff;
    background: crimson;
}

/* ---------- services ---------- */
.services, .teams{
    color: #fff;
    background: #111;
}
.services .title::before,
.teams .title::before{ background: #fff; }
.services .title::after,
.teams .title::after{
    background: #111;
    content: "what i provide";
}
.services .title{ margin-bottom: 0; }

.container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 40px 20px;
    background: #111;
}
.container .box{
    position: relative;
    width: 320px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 30px;
}
.container .box::before,
.container .box::after{
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 50%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    transition: .5s;
    transform: skewX(15deg);
}
.container .box::after{ filter: blur(30px); }
.container .box:hover::before,
.container .box:hover::after{
    transform: skewX(0deg);
    left: 20px;
    width: calc(100% - 90px);
}
.container .box:nth-child(1)::before, .container .box:nth-child(1)::after{ background: linear-gradient(315deg,#ffbc00,#ff0058); }
.container .box:nth-child(2)::before, .container .box:nth-child(2)::after{ background: linear-gradient(315deg,#03a9f4,#ff0058); }
.container .box:nth-child(3)::before, .container .box:nth-child(3)::after{ background: linear-gradient(315deg,#4dff03,#00d0ff); }
.container .box:nth-child(4)::before, .container .box:nth-child(4)::after{ background: linear-gradient(315deg,#eecda3,#ef629f); }

.container .box .content{
    position: relative;
    left: 0;
    padding: 20px 40px;
    background: rgba(255,255,255,.05);
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    border-radius: 8px;
    z-index: 1;
    transition: .5s;
    color: #fff;
}
.container .box:hover .content{
    left: -25px;
    padding: 60px 40px;
}
.container .box .content h2{
    font-size: 2em;
    color: #fff;
    margin-bottom: 10px;
}
.container .box .content p{
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.4em;
    padding: 12px;
}

/* hover icons (animation only runs while hovered, not always) */
.container .box span{
    display: block;
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
}
#first{  --ic1: url("https://cdn.icon-icons.com/icons2/2334/PNG/512/pen_tool_anchor_point_design_icon_142354.png"); --ic2: var(--ic1); }
#second{ --ic1: url("https://cdn.icon-icons.com/icons2/1145/PNG/512/codeoutlinedprogrammingsigns_81143.png"); --ic2: var(--ic1); }
#third{  --ic1: url("https://cdn.icon-icons.com/icons2/2066/PNG/512/search_icon_125165.png"); --ic2: var(--ic1); }
#fourth{ --ic1: url("https://cdn.icon-icons.com/icons2/620/PNG/512/bars-chart-ascending_icon-icons.com_56865.png"); --ic2: url("https://cdn.icon-icons.com/icons2/935/PNG/512/video-camera-outline_icon-icons.com_73112.png"); }
.container .box span::before,
.container .box span::after{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    opacity: 0;
    transition: .5s;
}
.container .box span::before{ top: 0; left: 0; }
.container .box span::after{ bottom: 0; right: 0; }
.container .box:hover span::before{
    top: -50px;
    left: 50px;
    width: 100px;
    height: 100px;
    opacity: 1;
    background: var(--ic1) no-repeat center / 100px;
    filter: invert(100%);
    animation: float 2s ease-in-out infinite;
}
.container .box:hover span::after{
    bottom: -50px;
    right: 50px;
    width: 100px;
    height: 100px;
    opacity: 1;
    background: var(--ic2) no-repeat center / 100px;
    animation: float 2s ease-in-out -1s infinite;
}
@keyframes float{
    0%,100%{ transform: translateY(10px); }
    50%{ transform: translateY(-10px); }
}

/* ---------- skills ---------- */
.skills .title::after{ content: "Tech Stack"; }
.skills .skills-content .column{ width: calc(50% - 30px); }
.skills .skills-content .left .text{
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}
.skills .skills-content .left p{ text-align: justify; }
.skills .skills-content .left a{
    display: inline-block;
    color: crimson;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    margin-top: 20px;
    border-radius: 6px;
    border: 2px solid crimson;
    transition: color .3s ease-in-out, background-color .3s ease-in-out;
}
.skills .skills-content .left a:hover{
    color: #fff;
    background: crimson;
}
.skills .skills-content .right .bars{ margin-bottom: 15px; }
.skills .skills-content .right .info{
    display: flex;
    gap: 12px;
    margin-bottom: 5px;
    align-items: center;
    justify-content: space-between;
}
.skills .skills-content .right span{
    font-weight: 500;
    font-size: 18px;
}
.skills .skills-content .right .line{
    height: 5px;
    width: 100%;
    background: lightgrey;
    position: relative;
}
.skills .skills-content .right .line::before{
    content: "";
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    width: var(--w, 50%);
    background: crimson;
}

/* ---------- projects carousel (vanilla, scroll-snap) ---------- */
.teams .title::after{ content: "Projects Done"; }
.teams .carousel{
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.teams .carousel::-webkit-scrollbar{ display: none; }
.teams .carousel .card{
    flex: 0 0 calc((100% - 40px) / 3);
    scroll-snap-align: start;
    background: #222;
    border-radius: 6px;
    padding: 25px 35px;
    text-align: center;
    overflow: hidden;
}
.teams .carousel .card .box{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.teams .carousel .card .text{
    font-size: 25px;
    font-weight: 500;
    margin: 10px 0 7px;
}
.teams .carousel .card img{
    height: 150px;
    width: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid crimson;
    transition: border-color .3s ease;
}
.teams .carousel .card:hover img{ border-color: #fff; }
.carousel-dots{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.carousel-dots button{
    height: 13px;
    width: 13px;
    padding: 0;
    background: transparent;
    border: 2px solid crimson;
    border-radius: 14px;
    cursor: pointer;
    transition: width .3s ease, background-color .3s ease;
}
.carousel-dots button.active{
    width: 35px;
    background: crimson;
}

/* ---------- lectures ---------- */
.lectures{ background: #111; color: #fff; }
.lectures .title::before{ background: #fff; }
.lectures .lect-intro{
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #ccc;
}
.lectures .lect-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
}
.lectures .lect-card{
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
    transition: transform .3s;
}
.lectures .lect-card:hover{ transform: translateY(-6px); }
.lectures .lect-card img{
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}
.lectures .lect-card .lect-text{ padding: 16px; }
.lectures .lect-card h3{ margin: 0 0 6px; font-size: 20px; }
.lectures .lect-card p{ margin: 0; color: #bbb; font-size: 15px; }

/* ---------- contact ---------- */
.contact .title::after{ content: "get in touch"; }
.contact .contact-content .column{ width: calc(50% - 30px); }
.contact .contact-content .text{
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}
.contact .contact-content .left p{ text-align: justify; }
.contact .contact-content .left .icons{ margin: 10px 0; }
.contact .contact-content .row{
    display: flex;
    min-height: 65px;
    align-items: center;
}
.contact .contact-content .row .info{
    margin-left: 30px;
    min-width: 0;
}
.contact .contact-content .row i{
    font-size: 25px;
    color: crimson;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.contact .contact-content .info .head{ font-weight: 500; }
.contact .contact-content .info .sub-title{
    color: #333;
    overflow-wrap: anywhere;   /* long email never forces sideways scroll */
}
.contact .right img{
    display: block;
    max-width: 100%;
    height: auto;
}
.button-area{
    display: flex;
    align-items: center;
    margin-top: 15px;
}
.button-area button{
    color: crimson;
    background: transparent;
    width: 160px;
    height: 45px;
    font-size: 18px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid crimson;
    transition: color .3s ease-in-out, background-color .3s ease-in-out;
}
.button-area button:hover{
    color: #fff;
    background: crimson;
}

/* ---------- footer ---------- */
footer{
    position: relative;
    width: 100%;
    background: #3586ff;
    min-height: 100px;
    padding: 20px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
footer > h2, footer > ul, footer > p{ position: relative; z-index: 2; }
footer h2{
    margin-bottom: 12px;
    color: #fff;
    font-size: 2em;
    text-align: center;
}
#media{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
}
#media li{
    position: relative;
    list-style: none;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform .5s;
}
#media li a{
    position: relative;
    color: var(--clr);
    z-index: 10;
    font-size: 2em;
}
#media li:hover{ transform: translateY(-10px); }
footer p{
    color: #fff;
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
}
footer p a{ color: #000; transition: color .5s ease-in-out; }
footer p a:hover{ text-decoration: underline; }

/* Waves: inline SVG tile (no external image), animated with transform (GPU) */
footer .waves{
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    pointer-events: none;
}
footer .wave{
    position: absolute;
    left: 0;
    width: calc(100% + 1000px);
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='%233586ff' d='M0 50C166 10 333 10 500 50S833 90 1000 50V100H0Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 1000px 100px;
    will-change: transform;
}
footer .wave#wave1{ bottom: 0;    opacity: 1;   animation: wave-move 4s linear infinite; }
footer .wave#wave2{ bottom: 10px; opacity: .5;  animation: wave-move 4s linear infinite reverse; }
footer .wave#wave3{ bottom: 15px; opacity: .2;  animation: wave-move 3s linear infinite; }
footer .wave#wave4{ bottom: 20px; opacity: .7;  animation: wave-move 3s linear infinite reverse; }
@keyframes wave-move{
    from{ transform: translateX(-1000px); }
    to{   transform: translateX(0); }
}

/* ---------- responsive ---------- */
@media (max-width: 1104px){
    .about .about-content .left img{ width: min(350px, 100%); }
}
@media (max-width: 991px){
    .max-width{ padding: 0 50px; }
}
@media (max-width: 947px){
    .menu-btn{ display: block; }
    .navbar .menu{
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        background: #111;
        text-align: center;
        padding-top: 80px;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s;
    }
    .navbar .menu.active{
        transform: none;
        visibility: visible;
    }
    .navbar .menu li{ display: block; }
    .navbar .menu li a{
        display: inline-block;
        margin: 20px 0;
        font-size: 25px;
    }
    .home{ background-attachment: scroll; }     /* fixed bg is janky/slow on touch devices */
    .max-width{ max-width: 930px; }
    .about .about-content .column{ width: 100%; }
    .about .about-content .left{
        display: flex;
        justify-content: center;
        margin: 0 auto 60px;
    }
    .about .about-content .right{ flex: 100%; }
    .skills .skills-content .column,
    .contact .contact-content .column{
        width: 100%;
        margin-bottom: 35px;
    }
    .teams .carousel .card{ flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 690px){
    section{ padding: 70px 0; }
    .max-width{ padding: 0 20px; }
    section .title{ font-size: 32px; margin-bottom: 45px; }
    .navbar .logo a{ font-size: 24px; }
    .classbox{ width: 190px; height: 90px; margin-top: 30px; }
    .classbox a{ font-size: 1em; padding: 0 14px; }
    .about .about-content .right p,
    .skills .skills-content .left p,
    .contact .contact-content .left p{ text-align: left; }
    .container .box{
        width: 100%;
        max-width: 320px;
        margin: 30px auto;
    }
    .container .box::after{ filter: blur(18px); }
    .teams .carousel .card{ flex-basis: 100%; padding: 25px 20px; }
    .teams .carousel .card .text{ font-size: 21px; }
    footer{ padding: 20px; }
    footer h2{ font-size: 1.5em; }
    #media{ gap: 10px; }
    #media li{ width: 64px; height: 64px; }
    #media li a{ font-size: 1.5em; }
    footer p{ font-size: 1em; }
}
@media (max-width: 500px){
    .about .about-content .right .text,
    .skills .skills-content .left .text{ font-size: 19px; }
    .skills .skills-content .right span{ font-size: 16px; }
    .scroll-up-btn{
        right: 15px;
        bottom: 15px;
        height: 38px;
        width: 35px;
        font-size: 23px;
        line-height: 38px;
    }
    .scroll-up-btn.show{ bottom: 20px; }
}
@media (max-width: 360px){
    .navbar .logo a{ font-size: 20px; }
}
@media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    *, *::before, *::after{
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}