/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #4dabf7;
    --secondary-color: #e9ecef;
    --text-color: #e9ecef;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    overflow-x: hidden; /* Prevent horizontal scroll on some animations */
}

html {
    scroll-behavior: smooth;
}

/* Particles.js container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

/* Theme Switch */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-switch-wrapper i {
    color: var(--text-color);
    font-size: 1.2rem;
}

/* Reusable styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
    position: relative;
}

section h2::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Navigation */
nav {
    position: fixed;
    width: 100%;
    background: rgba(var(--bg-color), 0.95);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(var(--bg-color), 0.98);
    box-shadow: 0 2px 15px var(--shadow-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

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

.mobile-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 2rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%233498db" stroke-width="0.8"/></svg>') repeat;
    opacity: 0.1;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    line-height: 1.1;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icon {
    color: var(--secondary-color);
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.hero-image {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    perspective: 1000px;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), transparent);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
    z-index: -1;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--primary-color), transparent);
    border-radius: 50%;
    z-index: -2;
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    border: 8px solid var(--bg-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.hero-image:hover img {
    transform: scale(1.05) rotateY(10deg);
    box-shadow: 0 15px 40px var(--shadow-color);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 3rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Skills Section */
.skills {
    background: var(--bg-color);
    padding: 8rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.skill-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 12px 25px rgba(var(--primary-color-rgb, 52, 152, 219), 0.3);
}

.skill-card i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.skill-card p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.skill-level {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    margin-top: 1rem;
    overflow: hidden;
    width: 100%;
}

.skill-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Projects Section */
.projects {
    background: var(--bg-color);
    padding: 8rem 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 12px 25px rgba(var(--primary-color-rgb, 52, 152, 219), 0.3);
}

.project-image {
    height: 220px;
    background: linear-gradient(45deg, var(--primary-color), #5ac8f5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4.5rem;
    color: white;
}

.project-card h3 {
    padding: 1.8rem 1.8rem 0.8rem;
    font-size: 1.6rem;
    color: var(--secondary-color);
}

.project-card p {
    padding: 0 1.8rem 1.2rem;
    color: var(--text-color);
    font-size: 1rem;
    flex-grow: 1;
}

.project-tags {
    padding: 0 1.8rem 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

.project-tags span {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--secondary-color-rgb, 44, 62, 80), 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
}

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

.project-link {
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border: 2px solid white;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.project-link:hover {
    background: white;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    background: var(--bg-color);
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(var(--primary-color-rgb, 52, 152, 219), 0.1);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite alternate;
    z-index: 1;
}

.contact::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: rgba(var(--secondary-color-rgb, 44, 62, 80), 0.08);
    border-radius: 50%;
    animation: rotate 15s linear infinite;
    z-index: 1;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
    align-items: flex-start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 1.1rem;
    font-weight: 500;
}

.whatsapp-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-button i {
    font-size: 1.4rem;
}

.hire-me-links {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.hire-me-links h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.freelance-platforms {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.platform-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2rem;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    font-weight: 500;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.platform-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(var(--primary-color-rgb, 52, 152, 219), 0.1),
        transparent
    );
    transition: 0.5s ease;
}

.platform-link:hover::before {
    left: 100%;
}

.platform-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(var(--primary-color-rgb, 52, 152, 219), 0.3);
    border-color: var(--primary-color);
}

.platform-link.fiverr:hover {
    border-color: #1DBF73;
    box-shadow: 0 8px 15px rgba(29, 191, 115, 0.4);
}

.platform-link.freelancer:hover {
    border-color: #29B2FE;
    box-shadow: 0 8px 15px rgba(41, 178, 254, 0.4);
}

/* Responsive adjustments for Hire Me section */
@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info,
    .hire-me-links {
        padding: 2rem;
    }

    .hire-me-links h3 {
        font-size: 1.8rem;
    }

    .freelance-platforms {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 6rem 0;
    }

    .contact-content {
        padding: 0 1.5rem;
    }

    .contact-item i {
        font-size: 1.5rem;
    }

    .whatsapp-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .whatsapp-button i {
        font-size: 1.2rem;
    }

    .platform-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .contact {
        padding: 4rem 0;
    }

    .contact-content {
        padding: 0 1rem;
    }

    .contact-info,
    .hire-me-links {
        padding: 1.5rem;
    }

    .hire-me-links h3 {
        font-size: 1.5rem;
    }

    .freelance-platforms {
        gap: 0.8rem;
    }

    .platform-link {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-color);
}

.footer-content .social-links {
    margin: 0;
}

.footer-content .social-icon {
    color: var(--text-color);
}

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

    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info,
    .hire-me-links {
        align-items: center;
    }

    .freelance-platforms {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .platform-link {
        width: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: var(--transition);
        box-shadow: 0 5px 15px var(--shadow-color);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .mobile-menu {
        display: block;
    }

    section {
        padding: 6rem 0;
    }

    section h2 {
        font-size: 2rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text h2 {
        font-size: 1.5rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
    }

    .hero-image {
        width: 300px;
        height: 300px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-item i {
        font-size: 2rem;
    }

    .overlay-text {
        font-size: 1rem;
    }

    .hire-me-links h3 {
        font-size: 1.5rem;
    }

    .skills-grid,
    .project-grid {
        padding: 0 1.5rem;
        gap: 2rem;
    }

    .skill-card,
    .project-card {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text h2 {
        font-size: 1.3rem;
    }

    section {
        padding: 4rem 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .skill-card,
    .project-card {
        padding: 1.5rem;
    }

    .hero-image {
        width: 250px;
        height: 250px;
    }

    .platform-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .skill-card i {
        font-size: 3rem;
    }

    .project-image {
        height: 180px;
    }

    .project-image i {
        font-size: 4rem;
    }

    .project-card h3 {
        font-size: 1.4rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .project-tags span {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }

    .project-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .skills-grid,
    .project-grid {
        padding: 0 1rem;
    }
}

.image-decoration {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: rotate 20s linear infinite reverse;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.hero-image:hover .overlay-content {
    transform: translateY(0);
}

.overlay-text {
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
} 