/* Add this to fix the header overlap */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
}

.hero {
    margin-top: 80px;
    /* pushes it below the header */
    height: calc(100vh - 80px);
    /* full viewport minus header */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Ensure sections have proper animation */
section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Fix project grid layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}


/* --------------------------------------------------------------------------------------------------------------- */
:root {
    --primary: #6e44ff;
    --secondary: #00e5ff;
    --accent: #ff2e63;
    --dark: #1a1a2e;
    --darker: #16213e;
    --light: #f0f0f0;
    --gray: #7f7f7f;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(270deg, var(--dark), var(--darker), var(--primary));
    background-size: 600% 600%;
    animation: gradientMove 20s ease infinite;
    overflow: hidden;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="none" stroke="%233355aa" stroke-width="0.5"/></svg>');
    opacity: 0.05;
    animation: gridScroll 30s linear infinite;
}

@keyframes gridScroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200px 200px;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-text {
    position: relative;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary), transparent);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--secondary);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(110, 68, 255, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(110, 68, 255, 0.6);
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 190px;
    transition: var(--transition);
    animation: float 8s ease-in-out infinite;
    z-index: 4;
}

.floating-card:nth-child(1) {
    top: 0%;
    left: 68%;
    background: linear-gradient(45deg, rgba(110, 68, 255, 0.2), rgba(0, 229, 255, 0.2));
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 25%;
    left: 73%;
    background: linear-gradient(45deg, rgba(255, 46, 99, 0.2), rgba(110, 68, 255, 0.2));
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    top: 50%;
    left: 78%;
    background: linear-gradient(45deg, rgba(0, 229, 255, 0.2), rgba(255, 46, 99, 0.2));
    animation-delay: 2s;
}

.floating-card:nth-child(4) {
    top: 75%;
    left: 83%;
    background: linear-gradient(335deg, rgba(0, 229, 255, 0.2), rgba(255, 46, 99, 0.2));
    animation-delay: 2s;
}

.floating-card i {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.floating-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.floating-card p {
    font-size: 0.8rem;
    color: var(--gray);
}

@keyframes float {

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

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

.code-window {
    background: var(--darker);
    border-radius: 10px;
    overflow: hidden;
    width: 70%;
    max-width: 330px;
    min-height: 280px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.window-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.window-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.window-button:nth-child(1) {
    background: var(--accent);
}

.window-button:nth-child(2) {
    background: var(--secondary);
}

.window-button:nth-child(3) {
    background: var(--primary);
}

.window-title {
    margin-left: 10px;
    font-size: 0.7rem;
    color: var(--light);
}

.code-content {
    padding: 20px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    line-height: 1rem;
    min-height: 200px;
    background: var(--darker);
}

.code-line {
    display: block;
    margin-bottom: 8px;
    /* Use margin instead of gap */
    padding: 2px 0;
    /* Add some padding for better spacing */
    background: transparent !important;
    /* Force transparent background */
}

.code-line:last-child {
    margin-bottom: 0;
}

.code-comment {
    color: var(--gray);
}

.code-keyword {
    color: var(--primary);
}

.code-function {
    color: var(--secondary);
}

.code-string {
    color: var(--accent);
}

/* --- Hero mobile improvements --- */
/* Keep desktop rules unchanged; these target smaller screens only */
@media (max-width: 992px) {
    .hero {
        margin-top: 80px;
        padding: 40px 0;
        height: auto;
    }

    .hero-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: start;
    }

    .hero-text {
        max-width: 100%;
        text-align: left;
        padding: 0 8px;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.15;
        margin-bottom: 10px;
    }

    .hero-title span {
        font-size: inherit;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 18px;
        max-width: 100%;
    }

    .hero-visual {
        height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0 8px 12px;
        gap: 8px;
    }

    .code-window {
        width: 100%;
        max-width: 420px;
        min-height: 180px;
    }

    .floating-card {
        position: relative;
        width: 100%;
        max-width: 420px;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
        padding: 16px;
        border-radius: 10px;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        animation: none;
    }

    .floating-card i {
        font-size: 1.6rem;
        margin: 0;
    }

    /* Hide secondary floating cards on smaller screens to reduce clutter */
    .mobile-hide {
        display: none;
    }

    /* Slightly smaller button on mobile */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* Optional tighter layout for very small screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .code-window {
        padding: 12px;
        min-height: 150px;
    }

    .hero-description {
        font-size: 0.95rem;
    }
}



/* About Section */
.about {
    background-color: var(--darker);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-image img:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-radius: 10px;
    z-index: -1;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.skill {
    background: rgba(110, 68, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(110, 68, 255, 0.5);
}

/* Skills Section */
.skills-section {
    background-color: var(--dark);
    padding: 80px 0;
}

.skills-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.skill-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category:hover {
    background: rgba(110, 68, 255, 0.1);
    transform: translateX(5px);
}

.category.active {
    background: rgba(110, 68, 255, 0.2);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(110, 68, 255, 0.3);
}

.category i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.category span {
    font-weight: 500;
}

.skills-grid {
    position: relative;
    min-height: 300px;
}

.skill-category-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.skill-category-content.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skill-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.skill-percent {
    color: var(--secondary);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0;
    position: relative;
    transition: width 1.5s ease-in-out;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design for Skills Section */
@media (max-width: 992px) {
    .skills-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .skill-categories {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .category {
        min-width: 150px;
    }

    .category:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 768px) {
    .skill-categories {
        flex-wrap: wrap;
    }

    .category {
        min-width: calc(50% - 10px);
    }
}



/* Projects Section - Redesigned */
.projects {
    background-color: var(--darker);
    position: relative;
    overflow: hidden;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(110, 68, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(110, 68, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    box-shadow: 0 5px 15px rgba(110, 68, 255, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
}

.project-card {
    perspective: 1000px;
    height: 400px;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card:hover .project-card-inner {
    transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.project-card-front {
    background: var(--dark);
    display: flex;
    flex-direction: column;
}

.project-card-back {
    background: linear-gradient(135deg, var(--primary), var(--darker));
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-img {
    height: 180px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.project-card:hover .project-img::before {
    left: 100%;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light);
}

.project-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--gray);
    flex-grow: 1;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    font-size: 0.7rem;
    background: rgba(0, 229, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    color: var(--secondary);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.project-card-back h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.project-features {
    list-style: none;
    margin-bottom: 25px;
}

.project-features li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.project-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Project filtering animation */
.project-card {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Responsive Design for Projects */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        height: 350px;
    }

    .project-card-back {
        padding: 20px;
    }

    .project-actions {
        flex-direction: column;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Add this to fix manual flip back */
.project-card.flipped .project-card-inner {
    transform: rotateY(180deg) !important;
}

/* Ensure hover works properly on desktop */
@media (min-width: 769px) {
    .project-card:hover .project-card-inner {
        transform: rotateY(180deg);
    }
}

/* Mobile flip with class */
@media (max-width: 768px) {
    .project-card.flipped .project-card-inner {
        transform: rotateY(180deg);
    }
}

/* Fix project card flip animation */
.project-card-inner {
    transition: transform 0.6s ease-in-out;
}

/* Remove the problematic overlay that causes text flash */
.project-overlay {
    display: none !important;
}

/* Ensure proper backface visibility */
.project-card-front,
.project-card-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix for mobile flip behavior */
@media (max-width: 768px) {
    .project-card {
        cursor: pointer;
    }

    .project-card:hover .project-card-inner {
        transform: none !important;
    }
}


/* Experience Section */
.experience {
    background-color: var(--darker);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 30px;
    position: relative;
    margin-bottom: 50px;
    width: 50%;
}

.timeline-item:nth-child(even) {
    align-self: flex-end;
    justify-content: flex-start;
    padding-left: 30px;
    padding-right: 0;
    left: 50%;
}

.timeline-content {
    background: var(--dark);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.7s ease;
}

.timeline-content.show {
    opacity: 1;
    transform: translateX(0);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--dark);
    transform: rotate(45deg);
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;
    right: auto;
}

.timeline-date {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--gray);
}

.timeline-icon {
    position: absolute;
    top: 0;
    right: -40px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 0 5px rgba(110, 68, 255, 0.2);
    animation: pulse 1.5s infinite;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -40px;
    right: auto;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Professional Profiles Section */
.profiles-section {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.profiles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(110, 68, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

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

.profile-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.profile-card:hover::before {
    left: 100%;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Platform-specific colors */
.profile-card.linkedin {
    border-left: 4px solid #0077b5;
}

.profile-card.github {
    border-left: 4px solid #333;
}

.profile-card.kaggle {
    border-left: 4px solid #20beff;
}

.profile-card.leetcode {
    border-left: 4px solid #ffa116;
}

.profile-card.fiverr {
    border-left: 4px solid #1dbf73;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
}

.platform-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
}

.linkedin .platform-icon {
    background: rgba(0, 119, 181, 0.2);
    color: #0077b5;
}

.github .platform-icon {
    background: #242424;
    color: #333;
}

.kaggle .platform-icon {
    background: rgba(32, 190, 255, 0.2);
    color: #20beff;
}

.leetcode .platform-icon {
    background: rgba(255, 161, 22, 0.2);
    color: #ffa116;
}

.fiverr .platform-icon {
    background: rgba(29, 191, 115, 0.2);
    color: #1dbf73;
}

.profile-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.profile-handle {
    color: var(--gray);
    font-size: 0.9rem;
}

.connection-pulse {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    position: absolute;
    right: 0;
    top: 0;
    animation: pulse 2s infinite;
}

.contribution-graph {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.graph-day {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 1px;
    opacity: 0.6;
}

.graph-day:nth-child(odd) {
    background: #00e5ff;
    opacity: 1;
}

.tier-badge {
    background: linear-gradient(45deg, #20beff, #0077b5);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-left: auto;
}

.difficulty-dots {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.easy {
    background: #00ff88;
}

.dot.medium {
    background: #ffa116;
}

.dot.hard {
    background: #ff2e63;
}

.rating-stars {
    margin-left: auto;
    color: #ffd700;
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.linkedin .stat-number {
    color: #0077b5;
}

.github .stat-number {
    color: #242424;
}

.kaggle .stat-number {
    color: #20beff;
}

.leetcode .stat-number {
    color: #ffa116;
}

.fiverr .stat-number {
    color: #1dbf73;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-visual {
    height: 100px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LinkedIn Network Visualization */
.network-visual {
    position: relative;
    width: 100px;
    height: 80px;
}

.central-node {
    width: 20px;
    height: 20px;
    background: #0077b5;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

.connection-node {
    width: 8px;
    height: 8px;
    background: #00e5ff;
    border-radius: 50%;
    position: absolute;
}

.connection-node:nth-child(2) {
    top: 20px;
    left: 20px;
}

.connection-node:nth-child(3) {
    top: 20px;
    right: 20px;
}

.connection-node:nth-child(4) {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.connection-line {
    position: absolute;
    background: rgba(0, 229, 255, 0.3);
    height: 2px;
    transform-origin: left center;
}

.connection-line:nth-child(5) {
    width: 30px;
    top: 30px;
    left: 40px;
    transform: rotate(-45deg);
}

.connection-line:nth-child(6) {
    width: 30px;
    top: 30px;
    right: 40px;
    transform: rotate(45deg);
}

.connection-line:nth-child(7) {
    width: 20px;
    bottom: 30px;
    left: 45px;
}

/* GitHub Code Activity */
.code-activity {
    width: 100%;
    position: relative;
}

.profile-card .code-activity .code-line {
    height: 4px;
    background: #242424;
    margin-bottom: 6px;
    border-radius: 2px;
    animation: codeTyping 3s infinite;
    width: 100%;
    /* Ensure full width */
}

/* Make sure the hero code lines don't get GitHub styles */
/* .hero-visual .code-content .code-line {
    height: auto !important;
    background: transparent !important;
    animation: none !important;
    border-radius: 0 !important;
} */

/* .code-line:nth-child(1) {
    width: 80%;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    width: 90%;
    animation-delay: 1s;
} */

.commit-timeline {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.commit-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: commitPulse 2s infinite;
}

.commit-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.commit-dot:nth-child(3) {
    animation-delay: 1s;
}

/* Kaggle Data Visualization */
.data-visual {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 60px;
    width: 100%;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, #20beff, #0077b5);
    border-radius: 3px 3px 0 0;
    animation: barGrow 2s ease-out;
}

/* LeetCode Progress Ring */
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring-bg {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.progress-ring-fill {
    fill: transparent;
    stroke: #ffa116;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 55;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    animation: progressFill 2s ease-out;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 600;
    color: #ffa116;
}

/* Fiverr Gig Visualization */
.gig-visual {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.gig-card {
    width: 20px;
    height: 30px;
    background: rgba(29, 191, 115, 0.3);
    border-radius: 3px;
    animation: gigFloat 3s ease-in-out infinite;
}

.gig-card:nth-child(2) {
    height: 40px;
    background: rgba(29, 191, 115, 0.6);
    animation-delay: 0.5s;
}

.gig-card:nth-child(3) {
    height: 25px;
    animation-delay: 1s;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes codeTyping {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes commitPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes barGrow {
    from {
        height: 0%;
    }

    to {
        height: attr(style);
    }
}

@keyframes progressFill {
    from {
        stroke-dashoffset: 220;
    }

    to {
        stroke-dashoffset: 55;
    }
}

@keyframes gigFloat {

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .profiles-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-card {
        padding: 20px;
    }

    .profile-stats {
        flex-direction: column;
        gap: 15px;
    }
}



/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--gray);
}

.contact-form {
    background: var(--darker);
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--darker);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 15px;
    display: block;
}

.footer-logo span {
    color: var(--primary);
}

.footer-about {
    max-width: 300px;
}

.footer-links h4,
.footer-newsletter h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

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

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

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px 0 0 5px;
    color: var(--light);
}

.newsletter-btn {
    padding: 0 15px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Particles Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
    opacity: 0.08;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        margin: 0 auto;
    }

    .hero-description {
        margin: 0 auto 40px;
    }

    .floating-card {
        display: none;
    }

    /* .code-window {
        margin: 0 auto;
    } */

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-content::after {
        left: -10px;
        right: auto;
    }

    .timeline-icon {
        left: 15px;
        right: auto;
    }

    .timeline-item:nth-child(even) .极细的边框 timeline-icon {
        left: 15px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--darker);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        gap: 30px;
    }

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

    .menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* --- Startup / Achievement section --- */
.startup {
    background: linear-gradient(180deg, rgba(26,26,46,0.85), rgba(22,33,62,0.95));
    color: var(--light);
    padding: 60px 0;
    clip-path: polygon(0 3%, 100% 0%, 100% 100%, 0% 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.startup-grid {
    display: grid;
    grid-template-columns: 1fr 540px;
    gap: 40px;
    align-items: start;
}

.startup-left .section-title {
    color: var(--light);
    margin-bottom: 30px;
}

.startup-tagline {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 35px;
    font-size: 1rem;
}

.startup-desc {
    color: rgba(240,240,240,0.9);
    max-width: 56ch;
    margin-bottom: 18px;
    line-height: 2;
}

.startup-cta-row {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.startup-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.startup .stat {
    text-align: left;
}

.startup .stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
}

.startup .stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.startup-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feature-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.feature-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.03);
    transition: transform 300ms ease, box-shadow 300ms ease;
    cursor: default;
    will-change: transform;
    backdrop-filter: blur(6px);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}

.card-icon {
    min-width: 48px;
    min-height: 48px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(110,68,255,0.18), rgba(0,229,255,0.12));
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--primary);
}

.feature-card h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--light);
}

.feature-card p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.milestones .mini-title {
    font-size: 0.95rem;
    color: var(--light);
    margin-bottom: 8px;
    font-weight: 600;
}

.milestone { margin-bottom: 12px; }

.milestone-info { display:flex; justify-content:space-between; font-size:0.85rem; color:var(--gray); margin-bottom:6px; }

.stat-bar { width:100%; height:10px; background: rgba(255,255,255,0.03); border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,0.02); }

.stat-progress { width:0; height:100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius:999px; transition: width 1200ms cubic-bezier(.2,.9,.2,1); box-shadow:0 6px 18px rgba(110,68,255,0.15); }

.startup.animate .stat-progress { width: var(--progress); }

@media (max-width: 992px) {
    .startup { padding: 42px 0; }
    .startup-grid { grid-template-columns: 1fr; gap: 22px; }
    .startup-stats { grid-template-columns: repeat(2, 1fr); }
    .startup-right { order: 2; }
}

@media (max-width: 480px) {
    .startup .stat-number { font-size: 1.2rem; }
    .feature-card { padding: 12px; gap: 10px; }
    .card-icon { min-width: 40px; min-height: 40px; font-size: 1.05rem; }
}

/* Heading and tagline alignment for startup section */
.startup .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.startup .section-title strong {
    color: var(--secondary);
    font-weight: 800;
}

.startup-tagline {
    text-align: center;
    color: var(--primary);
    margin-bottom: 35px;
    font-weight: 600;
}

.startup-tagline strong {
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-right: 6px;
}

.startup-grid {
    margin-top: 6px;
}
