/* Global Variables - Reference: Reeni Theme */
:root {
    --bg-color: #000000;
    /* Deepest Black */
    --bg-card: #0b0b10;
    --text-color: #ffffff;
    --text-muted: #c4cfde;
    --primary-color: #ff014f;
    --primary-glow: rgba(255, 1, 79, 0.5);
    --glass-bg: rgba(20, 20, 24, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.9);

    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Rubik', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 1, 79, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(25, 25, 112, 0.05) 0%, transparent 40%);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

ul {
    list-style: none;
}

/* UTILITY */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.mt-30 {
    margin-top: 30px;
}

.section-badge {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.center {
    text-align: center;
}

/* BUTTONS */
.btn {
    padding: 15px 35px;
    border-radius: 6px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px var(--primary-glow);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* GLASSMORPHISM */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: #191924;
    /* Fallback */
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.6) 0%, rgba(20, 20, 30, 0.4) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-7px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* NAVBAR */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 6, 6, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
}

/* FOOTER */
.glass-footer {
    border-top: 1px solid var(--glass-border);
    background: #000;
    padding: 30px 0;
    /* Space top and bottom */
    text-align: center;
    /* Center text */
}

.glass-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.glass-footer i {
    color: var(--primary-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo-text {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* HERO SECTION */
.hero {
    padding-top: 110px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.badge {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 20px;
}

/* Typing Effect - Reeni Style */
.hero-title {
    font-size: 4rem;
    line-height: applied;
    margin-bottom: 20px;
    min-height: 160px;
    /* Layout Stability */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cd-headline {
    font-size: 4rem;
    line-height: 1.2;
    color: #fff;
}

.cd-words-wrapper {
    display: inline-block;
    position: relative;
    text-align: left;
    color: var(--primary-color);
    font-weight: 700;
}

/* Cursor for Reeni effect */
.cd-words-wrapper .cursor {
    display: inline-block;
    color: var(--text-color);
    margin-left: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 500px;
}

/* HERO ACTIONS (Box Buttons + Socials) */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 50px;
}

.hero-btns-top {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* New Box Button Style */
.btn-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 110px;
    background: #0b0b10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.btn-box span {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #fff;
    z-index: 2;
}

.btn-box i {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: transform 0.3s, color 0.3s;
    z-index: 2;
}

/* Hover & Active States - Premium Glow */
.btn-box:hover,
.btn-box.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #101015, #000);
    box-shadow: 0 10px 30px -10px rgba(255, 1, 79, 0.4);
}

.btn-box:hover i,
.btn-box.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Text Row */
.find-me-row {
    margin-top: 5px;
}

.find-me-text {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    opacity: 0.9;
}

/* Socials + Contact Row */
.socials-contact-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.social-links-inline {
    display: flex;
    gap: 20px;
}

.social-links-inline a {
    font-size: 1.5rem;
    color: #ffffff;
    transition: transform 0.3s, color 0.3s;
}

.social-links-inline a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Small Contact Button */
.btn-sm {
    padding: 10px 25px;
    font-size: 0.9rem;
    border-radius: 6px;
    background: linear-gradient(90deg, #ff014f 0%, #d11414 100%);
    /* Strong Red Gradient */
    border: none;
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 1, 79, 0.4);
}

/* HERO IMAGE */
.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.img-wrapper-fancy {
    position: relative;
    width: 600px;
    height: 700px;
    z-index: 1;
    max-width: 95vw;
    margin-top: -80px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Red Background Glow (Emulating Reference) */
.img-wrapper-fancy::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 1, 79, 0.2) 0%, transparent 70%);
    z-index: -2;
    pointer-events: none;
}

/* Big Background Text (Animated) */
.img-wrapper-fancy::before {
    content: "DEVELOPER";
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.05);
    z-index: -1;
    white-space: nowrap;
    animation: floatText 5s ease-in-out infinite alternate;
}

@keyframes floatText {
    0% {
        transform: translate(-50%, -50%) translateY(0);
    }

    100% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

/* PULSATING GLOW ANIMATION */
@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 1, 79, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(255, 1, 79, 0.6));
    }

    100% {
        filter: drop-shadow(0 0 10px rgba(255, 1, 79, 0.3));
    }
}

.img-wrapper-fancy .main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    position: relative;
    z-index: 5;
    /* transition: filter 0.3s; <-- Removed to allow animation to control filter */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);

    /* Apply Glow Animation */
    animation: glowPulse 3s infinite ease-in-out;
    will-change: filter;
}

.img-wrapper-fancy:hover .main-img {
    filter: grayscale(0%);
    transform: scale(1.02);
    /* Slight zoom */
}

/* ROTATING TECH CIRCLES (Refined Orbit) */
.tech-circle-outer,
.tech-circle-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Centered */
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    /* Strictly behind Image (z-5) */
    pointer-events: none;
    will-change: transform;
    /* OPTIMIZATION */
}

/* ... existing styles ... */

.tech-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 65px;
    /* Bigger Icons */
    height: 65px;
    background: rgba(20, 20, 25, 0.9);
    /* Darker bg to hide line behind it */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 1, 79, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 1, 79, 0.2);
    /* Initial placement at center, then pushed out */
    transform-origin: center center;
    will-change: transform;
    /* OPTIMIZATION */
}

.tech-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Position Icons on Outer Circle */
.tech-circle-outer .tech-icon:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tech-circle-outer .tech-icon:nth-child(2) {
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
}

.tech-circle-outer .tech-icon:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

.tech-circle-outer .tech-icon:nth-child(4) {
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Position Icons on Inner Circle */
.tech-circle-inner .tech-icon:nth-child(1) {
    top: 15%;
    left: 15%;
}

.tech-circle-inner .tech-icon:nth-child(2) {
    top: 15%;
    right: 15%;
}

.tech-circle-inner .tech-icon:nth-child(3) {
    bottom: 15%;
    right: 15%;
}

.tech-circle-inner .tech-icon:nth-child(4) {
    bottom: 15%;
    left: 15%;
}


/* Counter-Rotate Icons to keep them upright */
.tech-circle-outer .tech-icon {
    animation: rotateFix 25s linear infinite reverse;
}

.tech-circle-inner .tech-icon {
    animation: rotateFix 20s linear infinite;
}

/* Matches inner reverse speed but opposite direction */

@keyframes rotateCircle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateFix {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    /* Need to preserve translate */
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Correction for Positioning + Rotation */
/* Since icons are placed specifically, simple counter-rotation might break the 'absolute' placement if I override transform.
   Better approach: Wrapper for rotation.
   Or: Use layout calculation in CSS.
   Let's use the 'transform-origin' trick or just simple keyframes that only rotate.
*/

.tech-circle-outer .tech-icon {
    /* Reset specific positions to rely on transforms strictly? No, let's keep it simple. */
    /* The simple counter-rotate only works if the element is centered. 
       If I use top/left placement, the valid transform is `translate(-50%, -50%) rotate(-360deg)`.
    */
    animation: rotateFixOuter 25s linear infinite;
}

.tech-circle-inner .tech-icon {
    animation: rotateFixInner 20s linear infinite;
}

@keyframes rotateFixOuter {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }

    /* Counteract CW rotation */
}

@keyframes rotateFixInner {

    /* Inner circle rotates CCW (reverse). So icons must rotate CW. */
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Adjust floating decorations slightly if needed */
.float-card {
    position: absolute;
    padding: 15px 20px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 1, 79, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 6;
    /* Make sure badges are visibly ON TOP of the circles if desired, or z-2 depending on user preference. Keeping high for visibility.*/
}

.float-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.float-card span {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.float-1 {
    top: 40px;
    left: -40px;
    animation: floatUp 3s infinite ease-in-out alternate;
}

.float-2 {
    bottom: 40px;
    right: -40px;
    animation: floatUp 3.5s infinite ease-in-out alternate-reverse;
}

/* ABOUT SECTION */
.about-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stat-box {
    text-align: center;
    min-width: 180px;
}

.year-box h2 {
    font-size: 3.5rem;
    color: var(--primary-color);
}

.project-box h3 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.project-box .icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.col-right {
    padding-left: 50px;
}

.section-title-left {
    font-size: 3rem;
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.about-cards-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* ABOUT EXTRA BUTTONS */
.extra-btns-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.btn-extra {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.btn-extra i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-extra:hover {
    background: rgba(255, 1, 79, 0.1);
    border-color: var(--primary-color);
}

.about-feature {
    flex: 1;
    text-align: center;
}

.about-feature i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    text-align: left;
    position: relative;
    overflow: hidden;
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.read-more {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more i {
    margin-left: 5px;
    transition: margin 0.3s;
}

.read-more:hover i {
    margin-left: 10px;
}

/* RESUME / TIMELINE */
.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 30px;
    margin-top: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 35px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item:hover::before {
    background: var(--primary-color);
}

.timeline-item .year {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.timeline-item h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.timeline-item .company {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.resume-cat-title {
    font-size: 2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.row {
    display: flex;
    gap: 50px;
}

.col-half {
    flex: 1;
}

/* SKILLS */
.skills-wrapper {
    display: flex;
    gap: 50px;
    margin-top: 40px;
}

.skill-col {
    flex: 1;
}

.skill-col h4 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.skill-bar-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bg {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 1s ease-out;
    border-radius: 5px;
}

/* PROJECTS */
.project-tabs {
    margin: 40px 0;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    padding: 0;
    overflow: hidden;
}

.project-card .img-box {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card .overlay i {
    font-size: 2rem;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.project-card:hover .overlay {
    opacity: 1;
}

.project-card:hover .overlay i {
    transform: translateY(0);
}

.p-content {
    padding: 20px;
}

.p-content .cat {
    color: var(--primary-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-content h3 {
    font-size: 1.4rem;
    margin-top: 5px;
}

/* CONTACT NEW STRUCTURE */
.contact-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-info-list {
    margin-top: 40px;
}

.info-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Force start */
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    text-align: left;
    /* Override parent center */
}

.info-box i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.info-box span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-box h4 {
    font-size: 1.1rem;
}

.form-box h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

.form-group-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.glass-input {
    width: 100%;
    background: #050507;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border 0.3s;
}

.glass-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.full-width {
    width: 100%;
    margin-bottom: 20px;
}

/* Resume Button Animation State */
#resume-btn.downloading {
    pointer-events: none;
    opacity: 0.8;
}

#resume-btn.downloading i {
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(3px);
    }
}

/* Success Message */
#form-message {
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    font-family: var(--font-heading);
    min-height: 20px;
}


/* LOADER & MODAL */
/* PERFECT LOADER - Enhanced */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loader-content {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    width: 50px;
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spinRing 1s linear infinite;
    box-shadow: 0 0 15px rgba(255, 1, 79, 0.2);
}

.ring::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #fff;
    animation: spinRing 1.5s linear infinite reverse;
}

/* Pulse effect for logo */
@keyframes pulseLogo {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

.loader-logo {
    animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #191924;
    width: 90%;
    max-width: 600px;
    position: relative;
    border: 1px solid var(--primary-color);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
}

#modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-btns {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ANIMATIONS */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-play-state: paused;
}

.fade-in-up.visible {
    animation-play-state: running;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .container {
        max-width: 100%;
    }

    .hero-container,
    .row {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
        margin-bottom: 50px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-image {
        width: 100%;
    }

    .img-wrapper-fancy {
        width: 300px;
        height: 380px;
    }

    .social-links-hero {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        gap: 15px;
    }

    .col-right {
        padding-left: 0;
        margin-top: 40px;
    }

    .skills-wrapper {
        flex-direction: column;
        gap: 20px;
    }
}

/* Mobile Menu - Re-styled */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #191924;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: right 0.4s ease;
    border-left: 1px solid var(--glass-border);
}

.mobile-menu.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu ul li {
    margin: 20px 0;
    text-align: center;
}

.mobile-menu ul li a {
    font-size: 1.2rem;
}

/* --- BACKGROUND CANVAS --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- FLOATING ACTIONS --- */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Floating Contact Button */
.floating-contact {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 1, 79, 0.6);
    transition: all 0.3s ease;
    animation: floatPulse 2s infinite;
    position: relative;
}

.floating-contact i {
    color: #fff;
    font-size: 1.6rem;
}

.floating-contact:hover {
    transform: scale(1.1);
}

.floating-contact .tooltip {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.floating-contact:hover .tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

@keyframes floatPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 1, 79, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 1, 79, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 1, 79, 0);
    }
}

/* Scroll Progress Button */
.progress-wrap {
    position: relative;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    transition: all 0.2s linear;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 99;
}

.progress-wrap svg.progress-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind icon */
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-wrap i {
    z-index: 10;
    color: var(--text-muted);
    font-size: 1rem;
    transition: 0.3s;
}

.progress-wrap:hover i {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.progress-circle path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4;
    box-sizing: border-box;
    transition: all 0.2s linear;
}

/* --- CERTIFICATIONS SECTION --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.cert-card {
    padding: 30px 20px;
    text-align: center;
    border-radius: 20px;
    transition: transform 0.3s, border-color 0.3s;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.cert-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.cert-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.cert-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}


/* --- MODAL UPDATES --- */
.modal-header h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
}

.modal-header p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.zoom-in {
    animation: zoomIn 0.3s ease-out forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- RESPONSIVE POLISH & MOBILE MENU --- */

/* Responsive Rules */
@media (max-width: 991px) {

    /* Global */
    .container {
        padding: 0 20px;
    }

    /* Hero */
    .hero-container,
    .row {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding-top: 80px;
        padding-bottom: 50px;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .cd-headline {
        font-size: 2rem;
        /* Fix text wrap */
        display: inline-block;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-btns-top {
        justify-content: center;
    }

    .hero-image {
        display: flex;
        justify-content: center;
        margin-top: 50px;
    }

    .img-wrapper-fancy {
        width: 360px;
        height: 480px;
        margin-top: 0;
    }

    /* Adjust background text for mobile */
    .img-wrapper-fancy::before {
        font-size: 4rem;
        /* Smaller outline text */
    }

    /* Resize Tech Circles for Mobile using Scale to preserve orbit logic */
    .tech-circle-outer {
        width: 750px;
        height: 750px;
        transform: translate(-50%, -50%) scale(0.5);
        /* Scale down so icons stay on line */
    }

    .tech-circle-inner {
        width: 550px;
        height: 550px;
        transform: translate(-50%, -50%) scale(0.5);
    }

    .tech-icon {
        /* Icons are scaled with container, so they retain relative position */
        /* If they look too small, we can try to scale them up, but 'scale' on container is safest for orbit. */
    }

    /* Keyframes for Mobile (Must override desktop transform to include scale) */
    @keyframes spinRingMobile {
        0% {
            transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        }

        100% {
            transform: translate(-50%, -50%) scale(0.5) rotate(360deg);
        }
    }

    @keyframes spinRingMobileInner {
        0% {
            transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        }

        100% {
            transform: translate(-50%, -50%) scale(0.5) rotate(-360deg);
        }
    }

    /* Alignment */
    .section-title {
        text-align: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Grids */
    .services-grid,
    .projects-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .extra-btns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-right {
        padding-left: 0;
        margin-top: 40px;
    }

    /* Contact Form on Mobile */
    .contact-container {
        flex-direction: column;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .contact-form {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .cd-headline {
        font-size: 1.4rem;
    }

    /* Ensure single line on small screens */
    .hero-btns-top {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns-top .btn {
        width: 100%;
    }
}

/* Mobile Menu Styling */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    /* More padding L/R */
}

.mobile-brand {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-img {
    height: 30px;
}

.mobile-menu ul {
    width: 100%;
    text-align: center;
}

.mobile-menu li {
    margin: 15px 0;
}

.mobile-menu-footer {
    width: 100%;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 50px;
    /* Extra bottom space */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

#mobile-hire-btn {
    width: 85%;
    /* Slightly smaller width */
}

.mobile-socials {
    display: flex;
    gap: 20px;
}

.mobile-socials a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    position: relative;
}

.mobile-socials a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Adjust Mobile Menu Container */
.mobile-menu {
    border-left: 1px solid var(--glass-border);
    justify-content: flex-start;
    /* Expand from top */
}

/* --- CUSTOM CURSOR --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: width 0.2s, height 0.2s;
    /* Smooth resize */
}

/* Hover Effect */
body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 1, 79, 0.1);
    border-color: transparent;
}

@media (max-width: 991px) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}