/* ============================================
   CSS Variables & Root Styles
   ============================================ */
:root {
    /* Light Mode Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #06b6d4;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.4);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-glass: rgba(0, 0, 0, 0.05);
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    transition: var(--transition);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 2px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.navbar {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: var(--transition);
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
}

/* ============================================
   Home Section
   ============================================ */
.home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 5% 80px;
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.home-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.home-greeting {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.home-name {
    font-size: 72px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.home-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.text-typing {
    color: var(--accent-primary);
    font-weight: 700;
}

.home-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.home-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.home-sci {
    display: flex;
    gap: 15px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 24px;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-gradient);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.home-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInRight 1s ease 0.5s forwards;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(40px);
    animation: pulse 3s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.responsive {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 100px 5%;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.section-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image .image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    padding: 8px;
    background: var(--accent-gradient);
    transition: var(--transition);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.3);
    overflow: hidden;
}

.about-image .image-wrapper::before,
.about-image .image-wrapper::after {
    display: none; /* Remove any glow effects */
}

.abt-res {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    transition: var(--transition);
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--bg-secondary);
    position: relative;
    z-index: 2;
    background: var(--bg-secondary);
}

.about-image .image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 50px rgba(6, 182, 212, 0.4);
}

.about-image .image-wrapper:hover .abt-res {
    border-color: var(--bg-primary);
}

.about-text {
    opacity: 0;
    animation: fadeInRight 0.8s ease 0.3s forwards;
}

.about-intro {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.highlight-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.highlight-card i {
    font-size: 40px;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.highlight-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.highlight-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Skills Section
   ============================================ */
.skills {
    padding: 100px 5%;
}

.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
    height: 100%;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.category-header i {
    font-size: 28px;
    color: var(--accent-primary);
}

.category-header h3 {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: default;
}

.skill-tag i {
    font-size: 18px;
    color: var(--accent-secondary);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.skill-tag:hover i {
    color: white;
}

/* ============================================
   Projects Section
   ============================================ */
.projects {
    padding: 100px 5%;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 20px;
}

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    transition: var(--transition);
    transform: translateY(20px);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-link:nth-child(2) {
    transition-delay: 0.1s;
}

.project-link:hover {
    transform: scale(1.1) rotate(5deg);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-badge {
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    transition: var(--transition);
}

.tech-badge:hover {
    background: var(--accent-gradient);
    color: white;
    transform: scale(1.05);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 100px 5%;
}

.contact-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item i {
    font-size: 32px;
    color: var(--accent-primary);
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.email-text {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.copy-btn {
    padding: 8px 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.copy-btn i {
    color: white;
    font-size: 16px;
    display: inline-block;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.copy-btn:hover i {
    color: white;
}

.contact-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.contact-form {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.form-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    color: #22c55e;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease;
}

.form-success.show {
    display: flex;
}

.form-success i {
    font-size: 24px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 30px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Scroll to Top
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .navbar {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        transition: left 0.3s ease;
    }

    .navbar.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .home {
        flex-direction: column;
        text-align: center;
        padding: 120px 5% 60px;
    }

    .home-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .home-name {
        font-size: 48px;
    }

    .home-title {
        font-size: 24px;
    }

    .home-image {
        width: 100%;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .home-name {
        font-size: 36px;
    }

    .home-title {
        font-size: 20px;
    }

    .home-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 32px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}
