* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
}
#home, #about, #skills, #experience, #projects, #blog, #contact{
    scroll-margin-top: 80px;
}
body{
    background:#0F172A;
    color:#FFFFFF;
} 

nav{
    width: 100%;
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(19, 41, 28, 0.443);
    backdrop-filter: blur(15px);
    margin-bottom: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    z-index: 1000;
}

/* Hamburger button - hidden on desktop, shown on mobile */
.hamburger{
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span{
    width: 26px;
    height: 3px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1){
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2){
    opacity: 0;
}
.hamburger.active span:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
}


.logo a{
    font-size: 1.8rem;
    font-weight: 700;
    color:#3B82F6;
    letter-spacing: 1px;
    text-decoration: none;
    
}
.logo a:hover{
    color:#5ac8ff;
}
.nav-links{
    display: flex;
    list-style: none;
    gap: 3rem;   
    margin-left: 30px; 
}
.nav-links li a{
   position: relative;
   font-size: 1.05rem;
   font-weight: 500;
   text-decoration: none;
   color:#FFFFFF;
   transition: 3s;
}
.nav-links li a:hover{
    color:#3B82F6;
    /* text-shadow: 0 0 10px #932292; */
     /* box-shadow: 0 0 20px #3B82F6; */

}
.nav-links li a.active-link{
    color:#3B82F6;
}

/* ================= BLOG DROPDOWN (SUBCATEGORY MENU) ================= */
.dropdown{
    position: relative;
}
.dropdown-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}
.dropdown-toggle i{
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}
.dropdown.active .dropdown-toggle i{
    transform: rotate(180deg);
}
.dropdown-menu{
    list-style: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    min-width: 190px;
    background: #111827;
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 10px;
    padding: 0.5rem 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.25s ease;
    z-index: 1002;
}
.dropdown-menu li a{
    display: block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    color: #FFFFFF;
    text-decoration: none;
    white-space: nowrap;
}
.dropdown-menu li a:hover{
    background: rgba(59,130,246,0.15);
    color: #3B82F6;
}

/* Desktop: show on hover */
@media (min-width: 769px){
    .dropdown:hover .dropdown-menu{
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.btns{
    margin-left: auto;
}
.nav-btn{
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 15px #38bdf8;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}
.nav-btn:hover{
    background:#0aa9f3;
    box-shadow: 0 0 15px #0aa9f3;
}

/* ================= NAV RESPONSIVE (MOBILE) ================= */
@media (max-width: 768px){

    nav{
        padding: 1rem 5%;
    }

    .hamburger{
        display: flex;
    }

    .nav-links{
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 70px);
        margin-left: 0;
        background: #111827;
        border-left: 1px solid rgba(59,130,246,0.2);
        padding-top: 3rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-links.active{
        right: 0;
    }

    .btns{
        margin-left: 0;
    }

    .logo a{
        font-size: 1.4rem;
    }

    /* Dropdown becomes an inline expandable panel on mobile */
    .dropdown{
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .dropdown-menu{
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(59,130,246,0.06);
        max-height: 0;
        width: 100%;
        padding: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .dropdown.active .dropdown-menu{
        max-height: 400px;
        padding: 0.5rem 0;
        margin-top: 0.8rem;
        overflow-y: auto;
    }

    .dropdown-menu li a{
        text-align: center;
        white-space: normal;
    }
}

main hr{
    border: 0;
    background: #9c97f1;
    height: 1.2px;
    margin: 40px 84px;
}

#element{
    color: rgb(115, 199, 26);
}

/* ================= HOME SECTION ================= */

.hero{
    width: 100%;
    min-height: 100vh;
    padding: 120px 5% 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    overflow: hidden;
}

/* --size drives every child below so the whole graphic scales together.
   Overridden per breakpoint instead of hard-coding pixels per element. */
.hero-image{
    --size: 500px;
    position:relative;
    width:var(--size);
    height:var(--size);
    max-width: 100%;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink: 0;
    margin: 0 auto;
}

/* ================= Glow ================= */

.glow{

    position:absolute;
    width:calc(var(--size) * 0.64);
    height:calc(var(--size) * 0.64);

    background:#4338ca;

    border-radius:50%;

    filter:blur(100px);

    opacity:.45;

    animation:pulse 4s ease-in-out infinite;
}

/* ================= Ring ================= */

.ring{

    position:absolute;

    width:calc(var(--size) * 0.94);
    height:calc(var(--size) * 0.94);

    border-radius:50%;

    border:2px solid rgba(255,255,255,.08);

    border-top:3px solid #4f46e5;

    animation:rotate 12s linear infinite;
}

/* ================= Image ================= */

.hero-image img{

    width:calc(var(--size) * 0.56);
    height:auto;
    max-width: 100%;

    position:relative;

    z-index:10;

    animation:float 4s ease-in-out infinite;

    transition:.4s;
}

.hero-image img:hover{

    transform:scale(1.05);

}

/* ================= Tech Cards ================= */

.tech{

    position:absolute;

    width:calc(var(--size) * 0.18);
    height:calc(var(--size) * 0.18);

    background:rgba(255,255,255,.06);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    border-radius:20px;

    color:white;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:clamp(9px, calc(var(--size) * 0.026), 15px);

    font-weight:bold;

    text-align:center;

    line-height:1.1;

    padding: 4px;

    z-index:20;

    animation:cardFloat 3s ease-in-out infinite;

    box-shadow:0 10px 30px rgba(0,0,0,.3);
}

.tech:hover{

    transform:translateY(-8px) scale(1.08);

    border-color:#4f46e5;
}

/* Position - percentage based so badges stay inside .hero-image at any size */

.html{
    top:2%;
    left:4%;
}

.js{
    top:14%;
    right:2%;
    animation-delay:1s;
}

.css{
    bottom:12%;
    left:8%;
    animation-delay:2s;
}

.git{
    bottom:4%;
    right:0%;
    animation-delay:3s;
}
.supabase {
    top: 1%;
    left: 35%;
    right: 12%;
    animation-delay: 4s;
}

/* ================= Animations ================= */

@keyframes float{

0%{
transform:translateY(0px);
}

50%{
transform:translateY(-15px);
}

100%{
transform:translateY(0px);
}

}

@keyframes rotate{

from{
transform:rotate(0deg);
}

to{
transform:rotate(360deg);
}

}

@keyframes pulse{

0%{
transform:scale(1);
opacity:.35;
}

50%{
transform:scale(1.15);
opacity:.6;
}

100%{
transform:scale(1);
opacity:.35;
}

}

@keyframes cardFloat{

0%{
transform:translateY(0px);
}

50%{
transform:translateY(-10px);
}

100%{
transform:translateY(0px);
}

}
.hero-left{
    flex: 1;
}

.hero-left h1{
    font-size: clamp(32px, 5vw, 60px);
    margin-bottom: 15px;
    line-height: 1.15;
}

.hero-left span{
    color: #4f46e5;
}

.hero-left h2{
    font-size: clamp(18px, 2.6vw, 30px);
    color: #CBD5E1;
    margin-bottom: 20px;
}

.hero-left p{
    font-size: 18px;
    color: #94A3B8;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-left .btn,
.hero-left .btn-secondary{
    margin-bottom: 10px;
    display: inline-block;
}

.btn{
    padding: 12px 28px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: .3s;
}

.btn:hover{
    background: #312e81;
}

.btn-secondary{
    padding: 12px 28px;
    border: 2px solid #4f46e5;
    color: #4f46e5;
    text-decoration: none;
    border-radius: 30px;
    transition: .3s;
}

.btn-secondary:hover{
    background: #4f46e5;
    color: white;
}

@media (max-width:768px){

    .hero{
        flex-direction: column-reverse;
        text-align: center;
        padding: 110px 20px 60px;
        gap: 30px;
    }

    .hero-left p{
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image{
        --size: 320px;
    }
}

@media (max-width:420px){

    .hero-image{
        --size: 250px;
    }
}
.marquee {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scroll 15s linear infinite;
}

.marquee-track img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  margin: 0 25px;
  
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/*================ ABOUT SECTION ================*/

.about{
    width:100%;
    min-height:100vh;
    padding:100px 10%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:70px;
     background:#111827;
}

.about-image{
    flex:1;
    display:flex;
    justify-content:center;
}

.about-image img{
    width:350px;
    border-radius:20px;
    box-shadow:0 15px 35px rgba(0,0,0,0.15);
}

.about-content{
    flex:1.2;
}

.section-subtitle{
    color:#3B82F6;
    font-size:18px;
    font-weight:600;
}

.about-content h1,
.about-content h2{
    font-size:42px;
    margin:10px 0 20px;
    color:#fff;
}

.about-content p{
    color:#CBD5E1;
    line-height:1.8;
    margin-bottom:18px;
    text-align:justify;
}

.about-cards{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    margin:35px 0;
}

.card{
    flex:1;
    min-width:180px;
    background:#1E293B;
    padding:20px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    transition:.3s;
}

.card:hover{
    transform:translateY(-8px);
}

.card h3{
    margin-bottom:10px;
    color:#fff;
}

.card p{
    margin:0;
     color:#CBD5E1;
}

.education-title{
    margin:40px 0 20px;
    font-size:28px;
}

.timeline{
    border-left:3px solid #4f46e5;
    margin-left:12px;
}

.timeline-item{
    position:relative;
    padding-left:30px;
    margin-bottom:30px;
}

.circle{
    width:16px;
    height:16px;
    background:#4f46e5;
    border-radius:50%;
    position:absolute;
    left:-10px;
    top:6px;
}

.timeline-content{
    background:#fff;
    padding:18px;
    border-radius:12px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.timeline-content h4{
    margin-bottom:5px;
}

.timeline-content p{
    margin-bottom:5px;
}

.timeline-content small{
    color:#777;
}

.about-btn{
    display:inline-block;
    margin-top:30px;
    padding:14px 35px;
    background:#4f46e5;
    color:#fff;
    text-decoration:none;
    border-radius:30px;
    transition:.3s;
}

.about-btn:hover{
    background:#312e81;
}

/*=============== RESPONSIVE ===============*/

@media(max-width:768px){

    .about{
        flex-direction:column;
        padding:80px 20px;
        text-align:center;
    }

    .about-image img{
        width:260px;
    }

    .about-content p{
        text-align:center;
    }

    .about-cards{
        justify-content:center;
    }

    .about-content h2{
        font-size:34px;
    }

}

/*================ PROJECTS ================*/

.projects{
    padding:100px 10%;
       background:#0F172A;
}

.projects h1,
.projects h2{
    font-size:42px;
    margin:10px 0;
    color:#fff;
}

.section-description{
    color:#CBD5E1;
    max-width:700px;
    margin-bottom:50px;
    line-height:1.8;
}

.project-heading{
    margin:40px 0 25px;
    font-size:28px;
     color:#fff;
}

.project-container,
.certificate-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:25px;
}

.project-card,
.certificate-card{
  background:#1E293B;
  border-radius:15px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    transition:.3s;
}

.project-card:hover,
.certificate-card:hover{
    transform:translateY(-8px);
}

.project-card img,
.certificate-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.project-card h3,
.certificate-card h4{
    margin:20px;
    color:#fff;
}

.project-card p,
.certificate-card p{
    margin:0 20px 20px;
    color:#CBD5E1;
}

.project-tech{
    margin:0 20px 20px;
}

/* ================= SKILLS PAGE ================= */

.skills-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
    margin-top:20px;
}

.skill-card{
    background:#1E293B;
    border:1px solid rgba(255,255,255,0.06);
    border-radius:16px;
    padding:28px;
    box-shadow:0 5px 20px rgba(0,0,0,.15);
    transition:.3s;
}

.skill-card:hover{
    transform:translateY(-8px);
    border-color:rgba(59,130,246,0.45);
    box-shadow:0 12px 30px rgba(59,130,246,0.18);
}

.skill-card-icon{
    width:52px;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#3B82F6,#4f46e5);
    color:#fff;
    border-radius:14px;
    font-size:20px;
    margin-bottom:18px;
    box-shadow:0 6px 16px rgba(59,130,246,0.35);
}

.skill-card h3{
    color:#fff;
    margin-bottom:16px;
    font-size:19px;
}

.skill-tags{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.skill-tags span{
    display:inline-block;
    background:rgba(59,130,246,0.12);
    color:#93C5FD;
    border:1px solid rgba(59,130,246,0.35);
    padding:6px 14px;
    border-radius:20px;
    font-size:13px;
    font-weight:500;
    transition:.25s;
}

.skill-card:hover .skill-tags span{
    background:#3B82F6;
    color:#fff;
    border-color:#3B82F6;
}

/* ================= EXPERIENCE PAGE ================= */

.experience-container{
    display:flex;
    flex-direction:column;
    gap:22px;
    margin-top:20px;
}

.experience-card{
    position:relative;
    display:flex;
    gap:22px;
    background:#1E293B;
    border:1px solid rgba(255,255,255,0.06);
    border-left:3px solid #3B82F6;
    border-radius:16px;
    padding:28px;
    box-shadow:0 5px 20px rgba(0,0,0,.15);
    transition:.3s;
}

.experience-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 30px rgba(59,130,246,0.18);
}

.experience-icon{
    flex-shrink:0;
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#3B82F6,#4f46e5);
    color:#fff;
    border-radius:14px;
    font-size:21px;
    box-shadow:0 6px 16px rgba(59,130,246,0.35);
}

.experience-body{
    flex:1;
    min-width:0;
}

.experience-header{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin-bottom:6px;
}

.experience-header h3{
    color:#fff;
    margin:0;
    font-size:19px;
}

.experience-duration{
    display:inline-block;
    background:rgba(59,130,246,0.12);
    color:#93C5FD;
    border:1px solid rgba(59,130,246,0.35);
    padding:5px 14px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
    letter-spacing:.2px;
    white-space:nowrap;
}

.experience-org{
    color:#3B82F6;
    font-weight:600;
    font-size:14.5px;
    margin-bottom:12px;
}

.experience-body p.experience-desc{
    color:#CBD5E1;
    line-height:1.8;
    margin-bottom:16px;
}

.experience-tags{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.experience-tags span{
    display:inline-block;
    background:rgba(255,255,255,0.05);
    color:#CBD5E1;
    border:1px solid rgba(255,255,255,0.12);
    padding:6px 14px;
    border-radius:20px;
    font-size:12.5px;
    font-weight:500;
}

@media(max-width:600px){
    .experience-card{
        flex-direction:column;
        padding:22px;
        gap:16px;
    }

    .experience-icon{
        width:46px;
        height:46px;
        font-size:18px;
    }

    .experience-header{
        gap:8px;
    }
}

/* ================= EXPERIENCE GALLERY ================= */

.gallery-heading{
    margin:60px 0 25px;
    font-size:28px;
    color:#fff;
}

.gallery-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:22px;
}

.gallery-card{
    position:relative;
    display:block;
    width:100%;
    background:#1E293B;
    border:1px solid rgba(255,255,255,0.06);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,.15);
    transition:.3s;
    padding:0;
    cursor:pointer;
    font:inherit;
    text-align:left;
    color:inherit;
}

.gallery-card:hover,
.gallery-card:focus-visible{
    transform:translateY(-8px);
    box-shadow:0 12px 30px rgba(59,130,246,0.25);
    outline:none;
}

.gallery-card img{
    width:100%;
    height:200px;
    object-fit:cover;
    display:block;
    transition:.4s;
}

.gallery-card:hover img{
    transform:scale(1.06);
}

.gallery-zoom{
    position:absolute;
    top:14px;
    right:14px;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(15,23,42,0.7);
    backdrop-filter:blur(4px);
    color:#fff;
    border-radius:50%;
    font-size:14px;
    opacity:0;
    transform:translateY(-6px);
    transition:.25s;
}

.gallery-card:hover .gallery-zoom,
.gallery-card:focus-visible .gallery-zoom{
    opacity:1;
    transform:translateY(0);
}

.gallery-caption{
    padding:16px 18px;
}

.gallery-caption h4{
    color:#fff;
    font-size:15px;
    margin-bottom:4px;
}

.gallery-caption span{
    color:#94A3B8;
    font-size:13px;
}

/* ================= LIGHTBOX ================= */

.lightbox-overlay{
    position:fixed;
    inset:0;
    background:rgba(6,10,20,0.92);
    backdrop-filter:blur(6px);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:20px;
    z-index:2000;
    opacity:0;
    visibility:hidden;
    transition:.3s;
}

.lightbox-overlay.active{
    opacity:1;
    visibility:visible;
}

.lightbox-content{
    position:relative;
    max-width:min(900px,90vw);
    max-height:85vh;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.lightbox-content img{
    max-width:100%;
    max-height:70vh;
    border-radius:14px;
    box-shadow:0 20px 60px rgba(0,0,0,0.5);
    object-fit:contain;
    background:#1E293B;
}

.lightbox-caption{
    text-align:center;
    margin-top:16px;
}

.lightbox-caption h4{
    color:#fff;
    font-size:18px;
    margin-bottom:4px;
}

.lightbox-caption span{
    color:#94A3B8;
    font-size:13px;
}

.lightbox-counter{
    position:absolute;
    top:-36px;
    right:0;
    color:#94A3B8;
    font-size:13px;
    letter-spacing:.5px;
}

.lightbox-close{
    position:absolute;
    top:20px;
    right:20px;
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.15);
    color:#fff;
    border-radius:50%;
    font-size:18px;
    cursor:pointer;
    transition:.25s;
    z-index:2001;
}

.lightbox-close:hover{
    background:#3B82F6;
    border-color:#3B82F6;
    transform:rotate(90deg);
}

.lightbox-nav{
    flex-shrink:0;
    width:52px;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.15);
    color:#fff;
    border-radius:50%;
    font-size:18px;
    cursor:pointer;
    transition:.25s;
}

.lightbox-nav:hover{
    background:#3B82F6;
    border-color:#3B82F6;
    transform:scale(1.08);
}

@media(max-width:768px){
    .lightbox-overlay{
        gap:8px;
        padding:16px;
    }

    .lightbox-nav{
        width:42px;
        height:42px;
        font-size:15px;
    }

    .lightbox-close{
        top:12px;
        right:12px;
        width:38px;
        height:38px;
        font-size:15px;
    }

    .lightbox-counter{
        top:-30px;
        font-size:12px;
    }
}

.project-tech span{
    display:inline-block;
    background:#3B82F6;
    color:#fff;
    padding:6px 12px;
    margin:5px;
    border-radius:20px;
    font-size:14px;
}

.project-btn{
    display:flex;
    gap:10px;
    padding:20px;
}

.project-btn a{
    flex:1;
    text-align:center;
    background:#4f46e5;
    color:#fff;
    text-decoration:none;
    padding:10px;
    border-radius:8px;
    transition:.3s;
}

.project-btn a:hover{
    background:#312e81;
}


/*================ BLOG SECTION ================*/

.blog{
    padding:100px 10%;
    background:#111827;
}

.blog h2{
    font-size:42px;
    margin:10px 0;
    color:#fff;
}

.section-description{
    max-width:700px;
    color:#CBD5E1;
    line-height:1.8;
    margin-bottom:50px;
}

.blog-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

.no-posts-message{
    display: none;
    text-align: center;
    color: #94A3B8;
    font-size: 1.05rem;
    padding: 40px 0;
}

.no-posts-message.show{
    display: block;
}

.blog-card{
    background:#1E293B;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    transition:.3s;
}

.blog-card:hover{
    transform:translateY(-8px);
}

.blog-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.blog-content{
    padding: 26px 26px;
}

.blog-date{
    color:#3B82F6;
    font-size:14px;
    font-weight:600;
}

.blog-content h3{
    margin:15px 0;
    font-size:24px;
}

.blog-content p{
    color:#CBD5E1;
    line-height:1.7;
    margin-bottom:20px;
}

.read-more{
    text-decoration:none;
    color:#3B82F6;
    font-weight:600;
    transition:.3s;
}

.read-more:hover{
    color:#60A5FA;
}

.blog-button{
    margin-top:50px;
    text-align:center;
}

.blog-button a{
    display:inline-block;
    padding:14px 35px;
    background:#3B82F6;
    color:#fff;
    text-decoration:none;
    border-radius:30px;
    transition:.3s;
}

.blog-button a:hover{
    background:#2563EB;
}

/*================ ALL ARTICLES PAGE (blog.html) ================*/

.all-blog-page{
    padding: 140px 10% 100px;
    background: #111827;
    min-height: 100vh;
}

.all-blog-header{
    margin-bottom: 40px;
}

.all-blog-header h1{
    font-size: 42px;
    margin: 10px 0;
    color: #fff;
}

/* Category filter bar */
.category-filter{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 45px;
}

.category-btn{
    padding: 0.55rem 1.3rem;
    border-radius: 30px;
    border: 1px solid rgba(59,130,246,0.35);
    background: transparent;
    color: #CBD5E1;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
}

.category-btn:hover{
    border-color: #3B82F6;
    color: #fff;
}

.category-btn.active{
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
    box-shadow: 0 0 15px rgba(59,130,246,0.4);
}

/* Demo / placeholder cards for categories without real posts yet */
.blog-card{
    position: relative;
}

.demo-badge{
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(15,23,42,0.85);
    color: #94A3B8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.3);
    z-index: 2;
}

.blog-card-icon{
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    color: #fff;
    background: linear-gradient(135deg, #1E293B, #3B82F6 150%);
}

.read-more.disabled{
    color: #64748B;
    pointer-events: none;
    cursor: default;
}

/*================ FOOTER (MODERN) ================*/

.footer {
    position: relative;
    background: #0F172A;
    color: #CBD5E1;
    padding: 70px 8% 30px;
    border-top: 1px solid rgba(59,130,246,0.15);
    overflow: hidden;
}

/* soft glow accent, matches the hero's glow treatment */
.footer::before{
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 240px;
    background: radial-gradient(circle, rgba(59,130,246,0.18), transparent 70%);
    pointer-events: none;
}

.footer .container{
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-top{
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
    text-align: left;
    padding-bottom: 40px;
}

.footer-brand h3 {
    margin-bottom: 12px;
    font-size: 26px;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.footer-brand p {
    margin: 0 0 22px;
    color: #94A3B8;
    line-height: 1.7;
    max-width: 320px;
}

.footer-social{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icon{
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(148,163,184,0.25);
    color: #CBD5E1;
    font-size: 16px;
    text-decoration: none;
    transition: 0.3s;
}

.social-icon:hover{
    color: #fff;
    background: #3B82F6;
    border-color: #3B82F6;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59,130,246,.5);
}

.footer-heading{
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul{
    list-style: none;
}

.footer-links li{
    margin-bottom: 12px;
}

.footer-links a{
    color: #94A3B8;
    text-decoration: none;
    font-size: 15px;
    transition: 0.25s;
}

.footer-links a:hover{
    color: #3B82F6;
    padding-left: 4px;
}

.footer-contact p{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    color: #94A3B8;
    font-size: 15px;
    line-height: 1.6;
}

.footer-contact p i{
    color: #3B82F6;
    margin-top: 3px;
}

.footer-contact a{
    color: #94A3B8;
    text-decoration: none;
    transition: 0.25s;
}

.footer-contact a:hover{
    color: #3B82F6;
}

.footer hr{
    border: none;
    height: 1px;
    background: rgba(148,163,184,0.15);
    margin: 0 0 24px;
}

.footer-bottom{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright{
    color: #64748B;
    font-size: 14px;
}

.back-to-top{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(148,163,184,0.25);
    transition: 0.3s;
}

.back-to-top:hover{
    color: #fff;
    border-color: #3B82F6;
    background: rgba(59,130,246,0.15);
}

@media (max-width: 768px){
    .footer{
        padding: 60px 6% 25px;
        text-align: center;
    }

    .footer-top{
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }

    .footer-brand p{
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social{
        justify-content: center;
    }

    .footer-contact p{
        justify-content: center;
    }

    .footer-bottom{
        flex-direction: column;
        text-align: center;
    }
}

/* ================= GLOBAL SMALL-SCREEN FIXES ================= */
/* Prevents horizontal scrolling / overflow on narrow phones (320-480px) */

html, body{
    overflow-x: hidden;
}

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

@media (max-width: 480px){

    .about,
    .projects,
    .blog{
        padding-left: 6%;
        padding-right: 6%;
    }

    .blog-container{
        grid-template-columns: 1fr;
    }

    main hr{
        margin: 40px 24px;
    }

    .about-content h1,
    .about-content h2,
    .projects h1,
    .projects h2,
    .blog h1,
    .blog h2{
        font-size: 30px;
    }
}

/* ================= HORIZONTAL CAROUSELS ================= */
/* Gallery, Projects and Certificates scroll sideways instead of wrapping
   into a grid. Native scroll + scroll-snap does the heavy lifting; script.js
   adds the arrow buttons and the scroll-into-view reveal on top. */

.carousel{
    position: relative;
}

.gallery-container,
.project-container,
.certificate-container{
    display: flex;
    gap: 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 12px 4px 26px;
    scrollbar-width: thin;
    scrollbar-color: #3B82F6 rgba(255, 255, 255, 0.06);
    -webkit-overflow-scrolling: touch;
}

/* Styled scrollbar (WebKit) */
.gallery-container::-webkit-scrollbar,
.project-container::-webkit-scrollbar,
.certificate-container::-webkit-scrollbar{
    height: 8px;
}
.gallery-container::-webkit-scrollbar-track,
.project-container::-webkit-scrollbar-track,
.certificate-container::-webkit-scrollbar-track{
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
}
.gallery-container::-webkit-scrollbar-thumb,
.project-container::-webkit-scrollbar-thumb,
.certificate-container::-webkit-scrollbar-thumb{
    background: linear-gradient(90deg, #3B82F6, #4f46e5);
    border-radius: 20px;
}

/* Cards become fixed-width slides that snap into place */
.gallery-container .gallery-card{
    flex: 0 0 300px;
    scroll-snap-align: start;
}
.project-container .project-card{
    flex: 0 0 340px;
    scroll-snap-align: start;
}
.certificate-container .certificate-card{
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Edge fades hint that there's more to scroll (hidden at the very ends) */
.carousel::before,
.carousel::after{
    content: "";
    position: absolute;
    top: 0;
    bottom: 26px;
    width: 64px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
}
.carousel::before{
    left: 0;
    background: linear-gradient(90deg, #0F172A, transparent);
}
.carousel::after{
    right: 0;
    background: linear-gradient(270deg, #0F172A, transparent);
}
.carousel.has-overflow::before,
.carousel.has-overflow::after{ opacity: 1; }
.carousel.at-start::before{ opacity: 0; }
.carousel.at-end::after{ opacity: 0; }

/* Arrow buttons (injected by script.js) */
.carousel-arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 15;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, background .25s ease, transform .25s ease, border-color .25s ease;
}
.carousel.has-overflow .carousel-arrow{
    opacity: .55;
    pointer-events: auto;
}
.carousel.has-overflow:hover .carousel-arrow,
.carousel-arrow:focus-visible{
    opacity: 1;
}
.carousel-arrow:hover{
    background: #3B82F6;
    border-color: #3B82F6;
    transform: translateY(-50%) scale(1.1);
}
.carousel-arrow:disabled{
    opacity: 0 !important;
    pointer-events: none;
}
.carousel-prev{ left: 6px; }
.carousel-next{ right: 6px; }

/* Make certificate cards feel zoomable, like the gallery */
.certificate-card{
    position: relative;
    cursor: zoom-in;
}
.certificate-card img{
    transition: transform .4s ease;
}
.certificate-card:hover img{
    transform: scale(1.05);
}
.certificate-card:hover .gallery-zoom,
.certificate-card:focus-visible .gallery-zoom{
    opacity: 1;
    transform: translateY(0);
}
.certificate-card:focus-visible{
    outline: none;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

/* Staggered reveal as cards scroll into view (script.js toggles .in-view).
   Uses the independent `translate` property so the hover lift (transform)
   keeps working once a card has appeared. */
@media (prefers-reduced-motion: no-preference){
    .reveal-card{
        opacity: 0;
        translate: 0 28px;
        transition: opacity .6s ease, translate .6s ease;
    }
    .reveal-card.in-view{
        opacity: 1;
        translate: 0 0;
    }
}

/* Carousel tweaks for phones: near-full-width slides, no arrows (swipe) */
@media (max-width: 600px){
    .gallery-container .gallery-card{ flex-basis: 78%; }
    .project-container .project-card{ flex-basis: 84%; }
    .certificate-container .certificate-card{ flex-basis: 80%; }

    .carousel-arrow{ display: none; }
    .carousel::before,
    .carousel::after{ width: 40px; }
}
/* =====================================================
   SINGLE ARTICLE PAGE
   ===================================================== */

.single-article {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 25px 80px;
    box-sizing: border-box;
}

/* Loading */
#articleLoading {
    text-align: center;
    padding: 80px 20px;
    font-size: 18px;
}

/* Article header */
.article-header {
    text-align: center;
    margin-bottom: 40px;
}

#articleCategory {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

#articleTitle {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    margin: 0 auto 25px;
    max-width: 850px;
    font-weight: 800;
}

#articleExcerpt {
    max-width: 750px;
    margin: 0 auto 20px;
    font-size: 19px;
    line-height: 1.7;
    opacity: 0.8;
}

#articleAuthor {
    font-size: 14px;
    opacity: 0.7;
}

/* Article image */
#articleImageContainer {
    width: 100%;
    margin: 35px 0 50px;
}

#articleImage {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
}

/* Article body */
.article-body {
    max-width: 780px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.9;
}

/* Paragraphs */
.article-body p {
    margin: 0 0 25px;
}

/* Headings */
.article-body h2 {
    font-size: 30px;
    margin: 50px 0 20px;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 24px;
    margin: 40px 0 15px;
    line-height: 1.4;
}

.article-body h4 {
    font-size: 20px;
    margin: 30px 0 15px;
}

/* Lists */
.article-body ul,
.article-body ol {
    margin: 20px 0 30px;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
}

/* Links */
.article-body a {
    text-decoration: underline;
}

/* Images inside article */
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 35px auto;
    border-radius: 12px;
}

/* Blockquotes */
.article-body blockquote {
    margin: 35px 0;
    padding: 20px 25px;
    border-left: 4px solid currentColor;
    font-style: italic;
    opacity: 0.9;
}

/* Code */
.article-body pre {
    overflow-x: auto;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
}

.article-body code {
    font-family: monospace;
}

/* Article footer */
.article-footer {
    max-width: 780px;
    margin: 70px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(128, 128, 128, 0.25);
}

/* Back button */
.article-footer .read-more {
    display: inline-block;
    text-decoration: none;
}

/* Article not found */
#articleError {
    text-align: center;
    padding: 80px 20px;
}

#articleError h1 {
    font-size: 40px;
    margin-bottom: 15px;
}


/* =====================================================
   FOOTER FIX FOR ARTICLE PAGE
   ===================================================== */

.single-article + .footer {
    margin-top: 0;
}


/* =====================================================
   MOBILE ARTICLE
   ===================================================== */

@media (max-width: 768px) {

    .single-article {
        padding: 110px 18px 50px;
    }

    #articleTitle {
        font-size: 34px;
    }

    #articleExcerpt {
        font-size: 17px;
    }

    .article-body {
        font-size: 17px;
        line-height: 1.8;
    }

    .article-body h2 {
        font-size: 27px;
        margin-top: 40px;
    }

    .article-body h3 {
        font-size: 22px;
    }

    #articleImage {
        max-height: 350px;
        border-radius: 10px;
    }

}
/* ==========================================
   ARTICLE META
   ========================================== */

.article-category {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
    font-size: 14px;
    opacity: 0.75;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.article-meta i {
    font-size: 14px;
}


/* Mobile */

@media (max-width: 600px) {

    .article-meta {
        gap: 12px;
        font-size: 13px;
    }

}
/* =====================================================
   ARTICLE PAGE
===================================================== */

.article-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 20px 80px;
}

.single-article {
    width: 100%;
}

.article-header {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 40px;
}

.article-category {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.article-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin: 0 auto 20px;
}

.article-excerpt {
    max-width: 750px;
    margin: 0 auto 25px;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    opacity: 0.75;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-author-link {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

.article-author-link:hover {
    text-decoration: underline;
}


/* =====================================================
   FEATURED IMAGE
===================================================== */

.article-image-container {
    width: 100%;
    margin: 0 auto 45px;
    border-radius: 16px;
    overflow: hidden;
}

.article-image-container img {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}


/* =====================================================
   ARTICLE BODY
===================================================== */

.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.85;
}

.article-body h2 {
    margin-top: 45px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.article-body h3 {
    margin-top: 35px;
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 22px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 25px 0;
}

.article-body a {
    text-decoration: underline;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    border-left: 4px solid currentColor;
    font-style: italic;
}

.article-body pre {
    overflow-x: auto;
    padding: 20px;
    border-radius: 10px;
}

.article-body code {
    font-family: monospace;
}


/* =====================================================
   TAGS
===================================================== */

.article-tags {
    max-width: 800px;
    margin: 45px auto 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.article-tags strong {
    margin-right: 5px;
}

#tagList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
}


/* =====================================================
   SHARE
===================================================== */

.article-share {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(128,128,128,0.25);
    border-bottom: 1px solid rgba(128,128,128,0.25);
}

.article-share h3 {
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    background: rgba(128,128,128,0.12);
    transition: transform 0.2s ease,
                opacity 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.copy-message {
    margin-top: 15px;
    font-size: 14px;
}


/* =====================================================
   RELATED ARTICLES
===================================================== */

.related-articles {
    max-width: 1000px;
    margin: 70px auto 50px;
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 30px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    overflow: hidden;
    border-radius: 12px;
    background: rgba(128,128,128,0.08);
}

.related-card img,
.related-placeholder {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.related-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
}

.related-card-content {
    padding: 18px;
}

.related-card-content > span {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
}

.related-card h3 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.35;
}

.related-card p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.75;
}

.related-card a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}


/* =====================================================
   LOADING
===================================================== */

.article-loading {
    text-align: center;
    padding: 100px 20px;
}

.article-loading i {
    font-size: 30px;
}


/* =====================================================
   ERROR
===================================================== */

.article-error {
    text-align: center;
    padding: 120px 20px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .article-page {
        padding: 100px 15px 50px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-meta {
        gap: 10px;
        font-size: 13px;
    }

    .article-body {
        font-size: 16px;
        line-height: 1.75;
    }

    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
    }

}