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

:root {
    --accent-rgb: 59, 130, 246; /* #3b82f6 */
    --accent: rgb(var(--accent-rgb));
    --accent-dark: #1d4ed8;
    --accent-glow: rgba(var(--accent-rgb), 0.12);
    
    --secondary-rgb: 96, 165, 250; /* #60a5fa (light blue) */
    --green: rgb(var(--secondary-rgb)); /* Map --green variable name to keep compatibility */
    --green-rgb: var(--secondary-rgb);

    --bg: #090d16; /* Sleek slate-navy */
    --bg-card: #131b2e;
    --bg-card2: #1e293b;
    --border: rgba(var(--accent-rgb), 0.12);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --header-bg: rgba(9, 13, 22, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

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

/* GSAP handles initial opacity via JS — no CSS override needed */

/* ===== NAVBAR ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 4%;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.logo {
    font-size: 22px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    cursor: default;
    letter-spacing: 4px;
    opacity: 0;
    animation: slideRight 0.5s ease forwards 0.05s;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.navbar a {
    display: inline-block;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
    opacity: 0;
    animation: slideUP 0.4s ease forwards 0.1s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.35s ease;
    transform-origin: center;
}

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

/* ===== HOME ===== */
.home {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    padding: 100px 6% 60px;
    overflow: hidden;
}

.home::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb),0.07) 0%, transparent 70%);
    pointer-events: none;
}

.home-content {
    max-width: 580px;
    z-index: 1;
}

.home-content h1 {
    font-size: 58px;
    font-weight: 700;
    letter-spacing: 4px;
    padding: 8px 0;
    /* letters animate individually via .name-letter — no parent opacity/animation */
}

.home-content h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    animation: slideBottom 0.6s ease forwards 0.1s;
}

.home-content h4 {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: #bbb;
    opacity: 0;
    animation: slideTop 0.6s ease forwards 0.35s;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.home-content h4 span.text {
    color: var(--accent);
    font-weight: 600;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 18px;
    color: var(--accent);
    text-decoration: none;
    margin: 16px 12px 16px 0;
    opacity: 0;
    animation: slideTop 0.4s ease forwards 0.25s;
    transition: all 0.3s ease;
}

.home-sci a:hover {
    background-color: var(--accent);
    color: #000;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.hero-img-wrapper {
    display: inline-block;
    position: absolute;
    right: 3%;
    bottom: 0;
    opacity: 0;
    animation: slideUP 0.8s ease forwards 0.2s;
}

.responsive {
    width: 420px;
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 20px 60px rgba(var(--secondary-rgb),0.15));
}

.responsive:hover {
    transform: scale(1.03) translateY(-6px);
}

/* ===== ABOUT ===== */
.about {
    background-color: var(--bg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    width: 100%;
    min-height: 100vh;
    padding: 100px 6%;
}

.about-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.second-image {
    display: block;
    max-width: 420px;
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 3px solid var(--accent);
    box-shadow: 0 20px 60px rgba(var(--secondary-rgb),0.15);
    transition: transform 0.4s ease;
    object-fit: cover;
}

.second-image:hover {
    transform: scale(1.03);
}

.about-text h2 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.about-text h2 span {
    color: var(--accent);
}

.about-text p {
    color: #e2e8f0;
    font-size: 16px;
    line-height: 2;
    letter-spacing: 0.5px;
    text-align: left;
}

.about-text p strong {
    color: var(--accent);
    font-weight: 600;
}

/* ===== TECH STACK / SKILLS ===== */
#Skills {
    background-color: var(--bg);
    padding: 80px 6% 60px;
}

.subtitle {
    font-size: 52px;
    line-height: 1;
    text-align: center;
    padding: 0 0 60px;
}

.subtitle span {
    color: var(--accent);
}

.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tech-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tech-group:hover {
    border-color: rgba(var(--secondary-rgb),0.4);
    box-shadow: 0 8px 40px rgba(var(--secondary-rgb),0.08);
}

.tech-group h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-group h3 i {
    font-size: 20px;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-group img {
    height: 28px;
    border-radius: 4px;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: brightness(0.9);
}

.badge-group img:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.1);
}

/* ===== EXPERIENCE / TIMELINE ===== */
#Experience {
    background: linear-gradient(180deg, var(--bg) 0%, #0c0c0c 100%);
    padding: 80px 6%;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 3px var(--accent-dark), 0 0 16px var(--accent-glow);
    z-index: 1;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(var(--secondary-rgb),0.4);
    box-shadow: 0 12px 48px rgba(var(--secondary-rgb),0.1);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.timeline-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    background: rgba(var(--secondary-rgb),0.1);
    border: 1px solid rgba(var(--secondary-rgb),0.25);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-list li {
    font-size: 14px;
    color: #aaa;
    line-height: 1.7;
    padding-left: 18px;
    position: relative;
}

.timeline-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 12px;
    top: 2px;
}

.timeline-list li strong {
    color: #ddd;
    font-weight: 600;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

/* ===== LIVE PROJECTS ===== */
#LiveProjects {
    background-color: var(--bg);
    padding: 80px 6% 40px;
}

.live-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.simple-live-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.simple-live-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(var(--secondary-rgb), 0.15);
    border-color: rgba(var(--secondary-rgb), 0.5);
}

.simple-live-card i {
    font-size: 2rem;
    color: var(--accent);
}

.simple-live-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    margin-bottom: 5px;
}

.simple-live-info p {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

.simple-live-card:hover .simple-live-info h3,
.simple-live-card:hover .simple-live-info p {
    color: var(--accent);
}

/* ===== PROJECTS ===== */
#Projects {
    background-color: var(--bg);
    padding: 0 6% 40px;
}

.main-text {
    padding-top: 80px;
    padding-bottom: 60px;
}

.main-text h2 {
    font-size: 52px;
    line-height: 1;
    text-align: center;
    padding: 0 0 60px;
}

.main-text h2 span {
    color: var(--accent);
}

.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(var(--secondary-rgb),0.12);
    border-color: rgba(var(--secondary-rgb),0.4);
}

.project-card h3 {
    color: var(--accent);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.project-card p {
    font-size: 0.9rem;
    color: #888;
    margin: 0.25rem 0;
    line-height: 1.6;
}

.project-tag {
    display: inline-block;
    background: rgba(var(--secondary-rgb),0.12);
    color: var(--accent);
    border: 1px solid rgba(var(--secondary-rgb),0.3);
    padding: 3px 10px;
    border-radius: 20px;
    margin: 4px 4px 0 0;
    font-size: 0.72rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.project-tag:hover {
    background: rgba(var(--secondary-rgb),0.25);
}

.project-icon {
    font-size: 1.8rem;
    color: var(--accent);
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    opacity: 0.7;
}

#portfolio {
    padding: 0;
}

/* ===== SERVICES ===== */
#Services {
    background-color: var(--bg);
    padding-bottom: 40px;
}

.sub-title {
    text-align: center;
    font-size: 52px;
    padding-top: 20px;
    padding-bottom: 40px;
}

.sub-title span {
    color: var(--accent);
}

.prj-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 20px;
}

.prj-list div {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 36px 28px;
    border-radius: 16px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.prj-list div:hover {
    transform: translateY(-5px);
    background: var(--bg-card2);
    box-shadow: 0 12px 40px rgba(var(--secondary-rgb),0.1);
    border-color: rgba(var(--secondary-rgb),0.4);
}

.container {
    padding: 60px 6%;
}

.prj-list div i {
    font-size: 42px;
    margin-bottom: 20px;
    display: block;
}

.prj-list div h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

.prj-list div p {
    font-size: 14px;
    color: #888;
    line-height: 1.8;
}

/* ===== CONTACT ===== */
.contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 6%;
    background: linear-gradient(180deg, var(--bg) 0%, #0a0a0a 100%);
    color: #fff;
    text-align: center;
}

.contact-text {
    max-width: 560px;
    margin: 0 auto;
}

.contact-text h2 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.contact-text h2 span {
    color: var(--accent);
}

.contact-text h4 {
    margin: 12px 0 32px;
    color: #888;
    font-size: 18px;
    font-weight: 400;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-icons a:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border);
    padding: 20px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #555;
    font-size: 14px;
}

.footer strong {
    color: var(--accent);
}

/* ===== SCROLL TO TOP ===== */
.top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    z-index: 500;
}

.top.active {
    opacity: 1;
    pointer-events: all;
}

.top i {
    color: #000;
    font-size: 20px;
}

.top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(var(--secondary-rgb),0.5);
}

/* ===== KEYFRAMES ===== */
@keyframes slideRight {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideTop {
    0% { transform: translateX(60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideBottom {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideUP {
    0% { transform: translateY(40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

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

/* Tablet - 900px to 1100px */
@media (max-width: 1100px) {
    .project-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .responsive {
        width: 340px;
    }
}

/* Switch to hamburger at 1080px so nav doesn't overflow */
@media (max-width: 1080px) {
    .hamburger {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: #0e0e0e;
        border-left: 1px solid var(--border);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 80px 36px 40px;
        gap: 6px;
        transition: right 0.35s ease;
        z-index: 999;
    }

    .navbar.nav-open {
        right: 0;
    }

    .navbar a {
        font-size: 17px;
        width: 100%;
        padding: 10px 14px;
        opacity: 1;
        animation: none;
    }

    .home {
        flex-direction: column;
        padding: 120px 6% 60px;
        align-items: flex-start;
        min-height: 100vh;
    }

    .hero-img-wrapper {
        position: relative;
        right: auto;
        bottom: auto;
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 30px;
    }

    .responsive {
        width: 300px;
    }

    .about {
        grid-template-columns: 1fr;
        padding: 100px 6% 60px;
        min-height: auto;
        gap: 2rem;
    }

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

    .second-image {
        max-width: 320px !important;
        max-height: 350px !important;
        width: 100% !important;
        height: auto;
        object-fit: cover;
    }

    .about-text h2 {
        font-size: 40px;
    }

    .timeline {
        padding-left: 28px;
    }

    .timeline-header {
        flex-direction: column;
    }

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

/* ===== MOBILE: 480px ===== */
@media (max-width: 480px) {
    .header {
        padding: 14px 5%;
    }

    .logo {
        font-size: 17px;
        letter-spacing: 2px;
    }

    /* Hero */
    .home {
        padding: 90px 5% 40px;
        align-items: center;
        text-align: center;
    }

    .home-content {
        max-width: 100%;
    }

    .home-content h1 {
        font-size: clamp(28px, 9vw, 40px);
        letter-spacing: 1px;
    }

    .home-content h3 {
        font-size: 18px;
    }

    .home-content h4 {
        font-size: 14px;
        line-height: 1.8;
    }

    /* Remove <br> effect on very small screens */
    .home-content h4 br {
        display: none;
    }

    .home-actions {
        justify-content: center;
    }

    .home-sci {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .stat-item {
        padding: 8px 14px;
    }

    .stat-divider {
        display: none;
    }

    .stat-num {
        font-size: 20px;
    }

    .stat-suffix {
        font-size: 14px;
    }

    .stat-label {
        font-size: 10px;
    }

    .hero-img-wrapper {
        margin-top: 24px;
    }

    .responsive {
        width: 200px;
    }

    /* About */
    .about {
        padding: 80px 5% 50px;
        gap: 1.5rem;
    }

    .about-text h2 {
        font-size: clamp(26px, 8vw, 38px);
        text-align: center;
    }

    .about-text p {
        font-size: 14px;
        line-height: 1.9;
        text-align: left;
    }

    .second-image {
        max-width: 240px !important;
        max-height: 280px !important;
        width: 100% !important;
        height: auto;
        object-fit: cover;
    }

    /* Section headings */
    .subtitle,
    .sub-title,
    .main-text h2,
    .contact-text h2 {
        font-size: clamp(26px, 8vw, 36px);
        padding-bottom: 32px;
    }

    /* Skills */
    #Skills {
        padding: 60px 5% 40px;
    }

    .tech-group {
        padding: 18px 16px;
    }

    .badge-group img {
        height: 22px;
    }

    /* Experience */
    #Experience {
        padding: 60px 5%;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline::before {
        left: 7px;
    }

    .timeline-dot {
        left: -26px;
        width: 11px;
        height: 11px;
    }

    .timeline-content {
        padding: 16px 14px;
    }

    .timeline-content h3 {
        font-size: 16px;
    }

    .timeline-content h4 {
        font-size: 13px;
    }

    .timeline-date {
        font-size: 11px;
    }

    /* Projects */
    #Projects {
        padding: 0 5% 30px;
    }

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

    .main-text {
        padding-top: 40px;
        padding-bottom: 24px;
    }

    .main-text h2 {
        font-size: clamp(26px, 8vw, 36px);
        padding-bottom: 24px;
    }

    /* Live Projects */
    #LiveProjects {
        padding: 60px 5% 30px;
    }

    .live-projects-grid {
        grid-template-columns: 1fr;
    }

    /* Services */
    .prj-list {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 40px 5%;
    }

    /* Contact */
    .contacts {
        padding: 60px 5%;
    }

    .contact-text h2 {
        font-size: clamp(26px, 8vw, 36px);
    }

    .contact-text h4 {
        font-size: 15px;
    }

    .contact-icons {
        flex-wrap: wrap;
        gap: 14px;
    }

    /* Footer */
    .footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 16px 5%;
    }
}

/* ===== MOBILE: 600px (fallback for slightly larger small screens) ===== */
@media (max-width: 600px) and (min-width: 481px) {
    .home {
        padding: 100px 5% 50px;
        text-align: center;
        align-items: center;
    }

    .home-content {
        max-width: 100%;
    }

    .home-actions {
        justify-content: center;
    }

    .home-sci {
        justify-content: center;
        display: flex;
    }

    .hero-stats {
        justify-content: center;
    }

    .home-content h1 {
        font-size: clamp(30px, 7vw, 42px);
        letter-spacing: 2px;
    }

    .home-content h3 {
        font-size: 20px;
    }

    .home-content h4 {
        font-size: 15px;
    }

    .responsive {
        width: 240px;
    }

    .about-text h2,
    .subtitle,
    .sub-title,
    .main-text h2,
    .contact-text h2 {
        font-size: clamp(28px, 7vw, 38px);
    }

    .about-text p {
        font-size: 14px;
    }

    #Skills,
    #Experience,
    #LiveProjects,
    #Projects,
    #Services .container {
        padding-left: 5%;
        padding-right: 5%;
    }

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

    .live-projects-grid {
        grid-template-columns: 1fr;
    }

    .tech-group {
        padding: 20px 18px;
    }

    .badge-group img {
        height: 24px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-dot {
        left: -28px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 20px 16px;
    }

    .timeline-content h3 {
        font-size: 17px;
    }

    .timeline-content h4 {
        font-size: 13px;
    }

    .timeline-date {
        font-size: 12px;
    }

    .main-text {
        padding-top: 40px;
        padding-bottom: 30px;
    }

    .main-text h2 {
        padding-bottom: 30px;
    }

    .prj-list {
        grid-template-columns: 1fr;
    }

    .contacts {
        padding: 60px 5%;
    }

    .contact-text h2 {
        font-size: 34px;
    }

    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ============================================================
   NEW ANIMATION ADDITIONS
   ============================================================ */

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--green));
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-glow), 0 0 4px var(--accent);
}

/* ===== CURSOR GLOW ===== */
#cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--secondary-rgb),0.07) 0%, transparent 65%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.3s ease;
    will-change: transform;
}

@media (max-width: 1080px) {
    #cursor-glow { display: none; }
}

/* ===== HERO CANVAS ===== */
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== HERO NAME LETTERS ===== */
.name-letter {
    display: inline-block;
    opacity: 0;
    animation: letterPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(0.08s + var(--li) * 0.04s);
}

@keyframes letterPop {
    0%   { opacity: 0; transform: translateY(30px) scale(0.65) rotate(-6deg); }
    55%  { opacity: 1; transform: translateY(-6px) scale(1.06) rotate(1.5deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

/* Hero name — no wrapper animation, letters handle everything */
#hero-name {
    color: #fff;
    position: relative;
}

/* ===== HERO STATS ===== */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 6px;
    opacity: 0;
    animation: slideTop 0.4s ease forwards 0.3s;
}

.stat-item {
    text-align: center;
    padding: 0 24px;
}

.stat-item:first-child {
    padding-left: 0;
}

.stat-num-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.stat-num {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-top: 4px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

@media (max-width: 1080px) {
    .stat-item { padding: 0 18px; }
    .stat-num  { font-size: 28px; }
}

@media (max-width: 600px) {
    .hero-stats { gap: 0; }
    .stat-item  { padding: 0 12px; }
    .stat-num   { font-size: 22px; }
    .stat-suffix{ font-size: 16px; }
    .stat-label { font-size: 10px; }
    .stat-divider { height: 30px; }
}

/* ===== ANIMATED GRADIENT BORDER on tech groups ===== */
.tech-group {
    position: relative;
    border: none !important;
}

.tech-group::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: linear-gradient(
        var(--grad-angle, 135deg),
        rgba(var(--secondary-rgb),0.5),
        rgba(var(--secondary-rgb),0.05) 40%,
        rgba(var(--accent-rgb),0.2) 70%,
        rgba(var(--secondary-rgb),0.5)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tech-group:hover::before {
    background: linear-gradient(
        var(--grad-angle, 135deg),
        var(--accent),
        rgba(var(--accent-rgb),0.6),
        var(--accent)
    );
    opacity: 1;
}

/* ===== TIMELINE DOT PULSE ===== */
.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: dotPulse 2.5s ease-out infinite;
}

@keyframes dotPulse {
    0%   { transform: scale(0.8); opacity: 0.8; }
    70%  { transform: scale(2);   opacity: 0; }
    100% { transform: scale(2);   opacity: 0; }
}

/* ===== 3D TILT CARDS ===== */
.project-card,
.prj-list div {
    transform-style: preserve-3d;
    will-change: transform;
}

.project-card .card-shine,
.prj-list div .card-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-shine,
.prj-list div:hover .card-shine {
    opacity: 1;
}

/* ===== SOCIAL BUTTON MAGNETIC ===== */
.social-btn {
    position: relative;
    transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease !important;
}

/* ===== SECTION TITLE REVEAL ===== */
.reveal-title {
    overflow: hidden;
    display: inline-block;
}

.reveal-title-inner {
    display: inline-block;
}

/* ===== FLOATING DOTS GRID (about section bg) ===== */
.about::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(var(--secondary-rgb),0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    z-index: 0;
}

.about {
    position: relative;
}

.about-img, .about-text {
    position: relative;
    z-index: 1;
}

/* ===== TIMELINE CARD ANIMATED LEFT BORDER ===== */
.timeline-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(180deg, var(--accent), var(--green));
    border-radius: 0 0 0 16px;
    transition: height 0.6s ease;
}

.timeline-content {
    position: relative;
    overflow: hidden;
}

.timeline-content.in-view::before {
    height: 100%;
}

/* ===== BADGE GLOW ON HOVER ===== */
.badge-group img:hover {
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(var(--secondary-rgb),0.5)) !important;
    transform: translateY(-4px) scale(1.1) !important;
}

/* ===== GLOWING SECTION HEADINGS ===== */
.subtitle span,
.sub-title span,
.main-text h2 span,
.about-text h2 span,
.contact-text h2 span {
    text-shadow: 0 0 30px rgba(var(--secondary-rgb),0.3);
}

/* ===== FOOTER GLITCH LINE ===== */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: footerLine 3s ease-in-out infinite;
}

.footer {
    position: relative;
}

@keyframes footerLine {
    0%   { left: 0; width: 0; opacity: 1; }
    50%  { left: 0; width: 100%; opacity: 1; }
    100% { left: 100%; width: 0; opacity: 0; }
}


/* ===== ORB GLOW FOR SECTIONS ===== */
.section-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.08) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
}
