/* Enable GPU acceleration for animations */
.skill-card,
.project-card,
.cert-card,
.social-link,
.btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
            --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
            --gradient-6: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
            
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Light Mode */
        [data-theme="light"] {
            --bg-primary: #ffffff;
            --bg-secondary: #f8fafc;
            --bg-tertiary: #f1f5f9;
            --surface: rgba(255, 255, 255, 0.8);
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-tertiary: #64748b;
            --border: rgba(0, 0, 0, 0.06);
            --shadow-color: rgba(0, 0, 0, 0.1);
            --card-bg: rgba(255, 255, 255, 0.9);
            --overlay: rgba(255, 255, 255, 0.8);
        }

        /* Dark Mode */
        [data-theme="dark"] {
            --bg-primary: #0a0a0a;
            --bg-secondary: #111111;
            --bg-tertiary: #1a1a1a;
            --surface: rgba(30, 30, 30, 0.8);
            --text-primary: #ffffff;
            --text-secondary: #a8a8a8;
            --text-tertiary: #6b6b6b;
            --border: rgba(255, 255, 255, 0.06);
            --shadow-color: rgba(0, 0, 0, 0.5);
            --card-bg: rgba(30, 30, 30, 0.9);
            --overlay: rgba(0, 0, 0, 0.8);
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            line-height: 1.6;
            transition: var(--transition);
        }

        /* Animated Gradient Background */
        .gradient-bg {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: -1;
            opacity: 0.05;
            background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Floating Particles */
        .particles {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: -1;
            overflow: hidden;
        }

        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: var(--primary-gradient);
            border-radius: 50%;
            opacity: 0.3;
            animation: float 20s infinite;
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(100vh) translateX(0);
                opacity: 0;
            }
            10% {
                opacity: 0.3;
            }
            90% {
                opacity: 0.3;
            }
            100% {
                transform: translateY(-100vh) translateX(100px);
                opacity: 0;
            }
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            width: 100%;
            padding: 1rem 0;
            z-index: 1000;
            transition: var(--transition);
            backdrop-filter: blur(20px);
            background: var(--overlay);
            border-bottom: 1px solid var(--border);
        }

        nav.scrolled {
            padding: 0.7rem 0;
            box-shadow: 0 10px 30px var(--shadow-color);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 800;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -1px;
        }

        .nav-links {
            display: flex;
            gap: 2.5rem;
            list-style: none;
            align-items: center;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            position: relative;
            font-size: 0.95rem;
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--text-primary);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 0;
            height: 3px;
            background: var(--primary-gradient);
            transition: width 0.3s ease;
            border-radius: 3px;
        }

        .nav-links a:hover::after,
        .nav-links a.active::after {
            width: 100%;
        }

        /* Theme Toggle */
        .theme-toggle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--surface);
            border: 1px solid var(--border);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            font-size: 1.2rem;
            color: var(--text-primary);
        }

        .theme-toggle:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px var(--shadow-color);
        }

        /* Hero Section */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6rem 2rem 4rem;
            position: relative;
            overflow: hidden;
        }

        .hero-bg {
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: var(--gradient-1);
            opacity: 0.1;
            border-radius: 50%;
            filter: blur(100px);
            animation: rotate 20s linear infinite;
        }

        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .hero-content {
            max-width: 1200px;
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .hero-text h1 {
            font-size: clamp(2.5rem, 5vw, 4rem);
            font-weight: 800;
            margin-bottom: 1rem;
            line-height: 1.1;
            letter-spacing: -2px;
            animation: fadeInUp 0.8s ease;
        }

        .gradient-text {
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero-text h2 {
            font-size: 1.5rem;
            color: var(--text-secondary);
            margin-bottom: 2rem;
            font-weight: 400;
            animation: fadeInUp 0.8s ease 0.2s;
            animation-fill-mode: both;
            white-space: normal;
            word-break: break-word;
        }

        .hero-text p {
            font-size: 1.1rem;
            color: var(--text-tertiary);
            margin-bottom: 2.5rem;
            line-height: 1.8;
            animation: fadeInUp 0.8s ease 0.4s;
            animation-fill-mode: both;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hero-buttons {
            display: flex;
            gap: 1rem;
            animation: fadeInUp 0.8s ease 0.6s;
            animation-fill-mode: both;
        }

        .btn {
            padding: 1rem 2rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            border: none;
            font-size: 1rem;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

        .btn:hover::before {
            transform: translateX(0);
        }

        .btn-primary {
            background: var(--primary-gradient);
            color: white;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
        }

        .btn-secondary {
            background: var(--surface);
            color: var(--text-primary);
            border: 2px solid var(--border);
            backdrop-filter: blur(10px);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            border-color: transparent;
            background: var(--gradient-2);
            color: white;
        }

        /* Hero Visual */
        .hero-visual {
            position: relative;
            animation: fadeInUp 0.8s ease 0.8s;
            animation-fill-mode: both;
        }

        .hero-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border-radius: 30px;
            padding: 3rem;
            box-shadow: 0 25px 50px -12px var(--shadow-color);
            border: 1px solid var(--border);
            position: relative;
            overflow: hidden;
            transition: var(--transition);
        }

        .hero-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--gradient-1);
            opacity: 0.1;
            border-radius: 30px;
            transition: opacity 0.3s ease;
        }

        .hero-card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 30px 60px -15px var(--shadow-color);
        }

        .hero-card:hover::before {
            opacity: 0.15;
        }

        .contact-info {
            position: relative;
            z-index: 1;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            color: var(--text-secondary);
            transition: var(--transition);
        }

        .contact-item:hover {
            color: var(--text-primary);
            transform: translateX(5px);
        }

        .contact-item i {
            width: 45px;
            height: 45px;
            background: var(--gradient-1);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.1rem;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .social-link {
            width: 50px;
            height: 50px;
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text-primary);
        }

        .social-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--gradient-1);
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }

        .social-link:hover::before {
            transform: translateY(0);
        }

        .social-link:hover {
            transform: translateY(-5px);
            color: white;
            border-color: transparent;
        }

        .social-link i {
            position: relative;
            z-index: 1;
        }

        /* Sections */
        section {
            padding: 5rem 2rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .section-title {
            text-align: center;
            margin-bottom: 4rem;
        }

        .section-title h2 {
            font-size: clamp(2rem, 4vw, 3rem);
            font-weight: 800;
            margin-bottom: 1rem;
            letter-spacing: -1px;
        }

        .section-title p {
            color: var(--text-secondary);
            font-size: 1.1rem;
        }

        /* Skills Section */
        .skills-section {
            background: var(--bg-secondary);
            position: relative;
            overflow: hidden;
        }

        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
            gap: 2rem;
            margin-top: 3rem;
        }

        .skill-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 2rem;
            border: 1px solid var(--border);
            transition: var(--transition);
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .skill-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--gradient-1);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .skill-card:hover {
            transform: translateY(-10px) scale(1.05);
            box-shadow: 0 20px 40px var(--shadow-color);
            border-color: transparent;
        }

        .skill-card:hover::before {
            opacity: 0.1;
        }

        .skill-icon {
            width: 70px;
            height: 70px;
            background: var(--gradient-1);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            font-size: 2rem;
            color: white;
            position: relative;
            z-index: 1;
            transition: var(--transition);
        }

        .skill-card:hover .skill-icon {
            transform: rotateY(360deg);
        }

        .skill-name {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }

        .skill-level {
            color: var(--text-secondary);
            font-size: 0.9rem;
            position: relative;
            z-index: 1;
        }

        /* Projects Section */
        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
            gap: 2rem;
            margin-top: 3rem;
        }

        .project-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid var(--border);
            transition: var(--transition);
            position: relative;
            group: true;
        }

        .project-card:hover {
            transform: translateY(-10px) scale(1.05);
            box-shadow: 0 25px 50px var(--shadow-color);
        }

        .project-header {
            height: 200px;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .project-header.gradient-1 { background: var(--gradient-1); }
        .project-header.gradient-2 { background: var(--gradient-2); }
        .project-header.gradient-3 { background: var(--gradient-3); }
        .project-header.gradient-4 { background: var(--gradient-4); }
        .project-header.gradient-5 { background: var(--gradient-5); }
        .project-header.gradient-6 { background: var(--gradient-6); }

        .project-header i {
            font-size: 4rem;
            color: white;
            opacity: 0.9;
            transition: var(--transition);
        }

        .project-card:hover .project-header i {
            transform: scale(1.2);
        }

        .project-content {
            padding: 2rem;
        }

        .project-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .project-tech {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .tech-tag {
            background: var(--surface);
            color: var(--text-primary);
            padding: 0.3rem 0.8rem;
            border-radius: 50px;
            font-size: 0.8rem;
            border: 1px solid var(--border);
            transition: var(--transition);
        }

        .project-card:hover .tech-tag {
            background: var(--gradient-1);
            color: white;
            border-color: transparent;
        }

        .project-description {
            color: var(--text-secondary);
            line-height: 1.6;
        }

        /* Certifications */
        .cert-section {
            background: var(--bg-secondary);
        }

        .cert-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
            gap: 1.5rem;
            margin-top: 3rem;
        }

        .cert-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid var(--border);
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 1rem;
            position: relative;
            overflow: hidden;
        }

        .cert-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: var(--gradient-1);
            opacity: 0.1;
            transition: left 0.3s ease;
        }

        .cert-card:hover::before {
            left: 0;
        }

        .cert-card:hover {
            transform: translateX(10px);
            box-shadow: 0 10px 30px var(--shadow-color);
        }

        .cert-icon {
            width: 50px;
            height: 50px;
            background: var(--gradient-1);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }

        .cert-info {
            position: relative;
            z-index: 1;
        }

        .cert-info h4 {
            font-size: 1.1rem;
            margin-bottom: 0.3rem;
            font-weight: 600;
        }

        .cert-info p {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Contact Section */
        .contact-section {
            background: var(--bg-primary);
            position: relative;
            overflow: hidden;
        }

        .contact-section::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: var(--gradient-2);
            opacity: 0.05;
            border-radius: 50%;
            filter: blur(100px);
        }

        .contact-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: start;
            position: relative;
            z-index: 1;
        }

        .contact-info-section h3 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            font-weight: 800;
            letter-spacing: -1px;
        }

        .contact-info-section p {
            color: var(--text-secondary);
            margin-bottom: 2rem;
            line-height: 1.8;
        }

        .contact-details {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .contact-form {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            padding: 2.5rem;
            border-radius: 20px;
            box-shadow: 0 25px 50px var(--shadow-color);
            border: 1px solid var(--border);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 1rem;
            border: 1px solid var(--border);
            border-radius: 12px;
            font-size: 1rem;
            font-family: inherit;
            transition: var(--transition);
            background: var(--surface);
            color: var(--text-primary);
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: transparent;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            background: var(--bg-primary);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
        }

        .form-button {
            width: 100%;
            padding: 1rem;
            background: var(--gradient-1);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .form-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transition: left 0.3s ease;
        }

        .form-button:hover::before {
            left: 0;
        }

        .form-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        }

        /* Footer */
        footer {
            background: var(--bg-secondary);
            padding: 3rem 2rem;
            text-align: center;
            border-top: 1px solid var(--border);
        }

        footer p {
            color: var(--text-secondary);
        }

        /* Scroll to Top */
        .scroll-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 50px;
            height: 50px;
            background: var(--gradient-1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
            opacity: 0;
            transform: translateY(100px);
            transition: var(--transition);
            z-index: 999;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        }

        .scroll-top.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .scroll-top:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
        }

        /* Mobile Menu */
        .mobile-menu {
            display: none;
            cursor: pointer;
            font-size: 1.5rem;
        }

        /* Mobile Nav Menu */
        .nav-links.mobile-active {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            background: var(--overlay);
            backdrop-filter: blur(10px);
            padding: 1.5rem;
            box-shadow: 0 10px 30px var(--shadow-color);
            animation: slideDown 0.3s ease;
            border-bottom: 1px solid var(--border);
            z-index: 1000;
        }

        @keyframes slideDown {
            from { 
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .nav-links.mobile-active li {
            margin: 1rem 0;
        }

        /* Loading Animation */
        .loading {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.5s ease;
        }

        .loading.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            position: relative;
        }

        .loading-spinner::before,
        .loading-spinner::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 3px solid transparent;
            border-top-color: #667eea;
            animation: spin 1s linear infinite;
        }

        .loading-spinner::after {
            border-top-color: #764ba2;
            animation-delay: 0.5s;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* About Section */
        .about-section {
            position: relative;
            overflow: hidden;
            background: var(--bg-primary);
        }

        .about-section::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: var(--gradient-3);
            opacity: 0.05;
            border-radius: 50%;
            filter: blur(100px);
        }

        .about-container {
            display: grid;
            grid-template-columns: 1fr 1.5fr;
            gap: 4rem;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .about-image {
            position: relative;
            text-align: center;
        }

        .image-wrapper {
            position: relative;
            display: inline-block;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 20px 40px var(--shadow-color);
            transform: translateY(0);
            transition: var(--transition);
        }

        .image-wrapper:hover {
            transform: translateY(-10px);
        }

        .image-wrapper img {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 20px;
            transition: var(--transition);
        }

        .image-wrapper:hover img {
            transform: scale(1.05);
        }

        .image-frame {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border: 3px solid transparent;
            border-radius: 20px;
            background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c) border-box;
            -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .about-content {
            padding-right: 2rem;
        }

        .about-content h3 {
            font-size: 1.5rem;
            font-weight: 700;
            margin: 1.5rem 0 0.8rem;
            position: relative;
            display: inline-block;
        }

        .about-content h3:first-child {
            margin-top: 0;
        }

        .about-content h3::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -5px;
            width: 50px;
            height: 3px;
            background: var(--gradient-1);
            border-radius: 3px;
        }

        .about-content p {
            color: var(--text-secondary);
            line-height: 1.8;
            margin-bottom: 1rem;
        }

        .about-stats {
            display: flex;
            gap: 2rem;
            margin: 2.5rem 0;
        }

        .stat-item {
            position: relative;
            padding-right: 2rem;
        }

        .stat-item:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 10%;
            height: 80%;
            width: 1px;
            background: var(--border);
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1;
        }

        .stat-label {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-top: 0.3rem;
        }

        .about-cta {
            margin-top: 1rem;
        }

        /* Certificate Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow-y: auto;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-container {
            background: var(--card-bg);
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            transform: scale(0.8);
            transition: all 0.3s ease;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border);
            margin: 2rem auto;
            display: flex;
            flex-direction: column;
        }

        .modal-overlay.active .modal-container {
            transform: scale(1);
        }

        .modal-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin: 0;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }

        .modal-close:hover {
            color: #f5576c;
            transform: rotate(90deg);
        }

        .modal-body {
            padding: 0;
            overflow-y: auto;
            max-height: calc(90vh - 120px);
            flex: 1;
        }

        .modal-iframe-container {
            width: 100%;
            height: 0;
            padding-bottom: 141.4%; /* A4 ratio */
            position: relative;
        }

        .modal-iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            background: var(--card-bg);
            position: relative;
            z-index: 2;
        }

        .modal-download {
            background: var(--gradient-1);
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 50px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modal-download:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .cert-error {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            text-align: center;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--card-bg);
            color: var(--text-primary);
        }

        .cert-error i {
            font-size: 3rem;
            margin-bottom: 1rem;
            color: #f5576c;
        }

        .cert-error p {
            font-size: 1rem;
            max-width: 80%;
            margin: 0 auto 1rem;
        }

        .cert-error-btn {
            background: var(--gradient-1);
            color: white;
            border: none;
            padding: 0.7rem 1.5rem;
            border-radius: 50px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            margin-top: 1rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: var(--transition);
        }

        .cert-error-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        /* Responsive — Tablet & Mobile */
        @media (max-width: 768px) {
            /* Prevent any element from causing horizontal scroll */
            *, *::before, *::after {
                max-width: 100%;
                box-sizing: border-box;
            }

            body {
                overflow-x: hidden;
            }

            /* Nav */
            .nav-links {
                display: none;
            }

            .mobile-menu {
                display: block;
            }

            .nav-container {
                padding: 0 1rem;
            }

            /* Hero */
            .hero-content {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 2rem;
            }

            .hero-text h1 {
                font-size: 2.5rem;
                letter-spacing: -1px;
            }

            .hero-buttons {
                justify-content: center;
                flex-wrap: wrap;
                gap: 0.75rem;
            }

            .hero-visual {
                display: none;
            }

            /* About */
            .about-container {
                grid-template-columns: 1fr;
                gap: 2rem;
            }

            .about-image {
                order: -1;
            }

            .about-content {
                padding-right: 0;
                text-align: left;
            }

            .about-content h3::after {
                left: 0;
                transform: none;
            }

            .about-stats {
                justify-content: center;
            }

            /* Skills */
            .skills-grid {
                grid-template-columns: 1fr;
            }

            /* Projects */
            .projects-grid {
                grid-template-columns: 1fr;
            }

            .project-card {
                min-width: 0;
            }

            /* Certificates */
            .cert-grid {
                grid-template-columns: 1fr;
            }

            /* Contact */
            .contact-container {
                grid-template-columns: 1fr;
                padding: 0 1rem;
                gap: 2rem;
            }

            .contact-form {
                padding: 1.5rem;
            }

            /* Social */
            .social-links {
                justify-content: center;
            }

            /* Modal */
            .modal-container {
                width: 95%;
                max-height: 85vh;
                margin: 1rem auto;
            }

            .modal-body {
                max-height: calc(85vh - 120px);
            }

            /* Timeline / Experience */
            .timeline-item {
                flex-direction: column;
                padding-left: 1rem;
            }

            .timeline-content {
                width: 100% !important;
                margin-left: 0 !important;
                margin-right: 0 !important;
            }

            /* Tag wrapping */
            .project-tags,
            .skill-tags,
            .tags {
                flex-wrap: wrap;
            }
        }

        /* Small phones */
        @media (max-width: 480px) {
            section {
                padding: 3rem 1rem;
            }

            .hero-text h1 {
                font-size: 1.9rem;
                letter-spacing: -0.5px;
            }

            .hero-text h2 {
                font-size: 1.1rem;
            }

            .section-title h2 {
                font-size: 1.7rem;
            }

            .btn {
                padding: 0.75rem 1.25rem;
                font-size: 0.875rem;
            }

            .hero-buttons {
                flex-direction: column;
                align-items: center;
            }

            .about-stats {
                flex-direction: column;
                align-items: center;
                gap: 1.5rem;
            }

            .stat-item {
                padding-right: 0;
                text-align: center;
            }

            .stat-item:not(:last-child)::after {
                display: none;
            }

            .skill-card {
                padding: 1.5rem;
            }

            .contact-form {
                padding: 1.25rem;
            }

            .contact-info-section h3 {
                font-size: 1.8rem;
            }

            .cert-card {
                flex-direction: column;
                text-align: center;
            }

            .modal-title {
                font-size: 1.1rem;
            }

            .nav-container {
                padding: 0 0.75rem;
            }
        }
