 /* Modern CSS with Dark Mode */
 :root {
     --primary: #4361ee;
     --primary-dark: #3a56d4;
     --secondary: #7209b7;
     --dark: #212529;
     --dark-bg: #121212;
     --dark-surface: #1e1e1e;
     --dark-text: #e0e0e0;
     --light: #f8f9fa;
     --gray: #6c757d;
     --gray-dark: #495057;

     /* Animation variables */
     --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
     --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Inter', system-ui, sans-serif;
 }

 @supports (font-variation-settings: normal) {
     * {
         font-family: 'Inter var', system-ui;
     }
 }

 body {
     line-height: 1.6;
     color: var(--dark);
     background: white;
     overflow-x: hidden;
 }

 body.dark-mode {
     background: var(--dark-bg);
     color: var(--dark-text);
 }

 /* Smooth scroll */
 html {
     scroll-behavior: smooth;
 }

 /* Dark mode toggle */
 .theme-toggle {
     position: fixed;
     top: 1.5rem;
     right: 1.5rem;
     z-index: 100;
     background: var(--light);
     border: none;
     width: 2.5rem;
     height: 2.5rem;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     transition: var(--transition);
     transform: translateY(0);
 }

 .theme-toggle:hover {
     transform: translateY(-3px) rotate(15deg);
 }

 .dark-mode .theme-toggle {
     background: var(--dark-surface);
     color: white;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
 }

 /* Header */
 header {
     padding: 2rem 5%;
     max-width: 1200px;
     margin: 0 auto;
     opacity: 0;
     animation: fadeIn 0.8s 0.2s var(--ease-out) forwards;
 }

 nav {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 4rem;
 }

 .logo {
     font-weight: 800;
     font-size: 1.5rem;
     color: var(--primary);
     position: relative;
     display: inline-block;
 }

 .logo::after {
     content: '';
     position: absolute;
     bottom: -5px;
     left: 0;
     width: 100%;
     height: 3px;
     background: var(--primary);
     transform: scaleX(0);
     transform-origin: right;
     transition: transform 0.4s var(--ease-out);
 }

 .logo:hover::after {
     transform: scaleX(1);
     transform-origin: left;
 }

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

 /* Hero */
 .hero {
     text-align: center;
     padding: 4rem 0 6rem;
     transform: translateY(20px);
     opacity: 0;
     animation: fadeUp 0.8s 0.4s var(--ease-out) forwards;
     position: relative;
     overflow: hidden;
 }

 .hero::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -50%;
     width: 200%;
     height: 200%;
     background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
     z-index: -1;
     animation: pulse 12s infinite alternate;
 }

 .dark-mode .hero::before {
     background: radial-gradient(circle, rgba(67, 97, 238, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
 }

 h1 {
     font-size: clamp(2rem, 5vw, 3.5rem);
     margin-bottom: 1rem;
     line-height: 1.2;
     font-weight: 800;
     background: linear-gradient(90deg, var(--primary), var(--secondary));
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
     display: inline-block;
 }

 .dark-mode h1 {
     background: linear-gradient(90deg, var(--primary-dark), #8a2be2);
     -webkit-background-clip: text;
     background-clip: text;
 }

 .hero p {
     font-size: 1.25rem;
     max-width: 700px;
     margin: 0 auto 2rem;
     color: var(--gray);
 }

 .dark-mode .hero p {
     color: var(--gray-dark);
 }

 .btn {
     display: inline-block;
     background: var(--primary);
     color: white;
     padding: 0.75rem 1.75rem;
     border-radius: 50px;
     text-decoration: none;
     font-weight: 600;
     transition: transform 0.3s var(--ease-out), background-color var(--transition), box-shadow 0.3s var(--ease-out);
     position: relative;
     overflow: hidden;
     border: none;
     cursor: pointer;
     box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
 }

 .btn::after {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
     opacity: 0;
     transition: opacity 0.3s;
 }

 .btn:hover {
     transform: translateY(-3px);
     background: var(--primary-dark);
     box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
 }

 .btn:hover::after {
     opacity: 1;
 }

 .btn:active {
     transform: translateY(1px);
 }

 /* Sections */
 section {
     padding: 6rem 5%;
     max-width: 1200px;
     margin: 0 auto;
     opacity: 0;
     transform: translateY(20px);
     transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
 }

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

 h2 {
     font-size: 2.25rem;
     margin-bottom: 3rem;
     text-align: center;
     position: relative;
     display: inline-block;
     left: 50%;
     transform: translateX(-50%);
 }

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

 .dark-mode h2 {
     color: white;
 }

 .dark-mode h2::after {
     background: var(--primary-dark);
 }

 /* Skills Section */
 .skills {
     background: var(--light);
 }

 .dark-mode .skills {
     background: #1a1a1a;
 }

 .skills-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
     gap: 1.5rem;
     max-width: 800px;
     margin: 0 auto;
 }

 .skill-card {
     background: white;
     padding: 1.5rem;
     border-radius: 8px;
     text-align: center;
     transition: var(--transition);
     transform: scale(0.95);
     opacity: 0;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
 }

 .skill-card.visible {
     animation: scaleIn 0.6s var(--ease-out) forwards;
 }

 .skill-card:hover {
     transform: translateY(-5px) scale(1.03);
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
 }

 .dark-mode .skill-card {
     background: var(--dark-surface);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
 }

 .skill-icon {
     font-size: 2.5rem;
     margin-bottom: 1rem;
     color: var(--primary);
 }

 .dark-mode .skill-icon {
     color: var(--primary-dark);
 }

 .skill-card h3 {
     font-size: 1rem;
     margin-bottom: 0.5rem;
 }

 /* Portfolio */
 .portfolio-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     gap: 2rem;
 }

 .portfolio-item {
     border-radius: 8px;
     overflow: hidden;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
     transition: var(--transition);
     transform: translateY(20px);
     opacity: 0;
     background: white;
 }

 .portfolio-item.visible {
     animation: fadeUp 0.6s var(--ease-out) forwards;
 }

 .portfolio-item:hover {
     transform: translateY(-10px) !important;
     box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
 }

 .dark-mode .portfolio-item {
     background: var(--dark-surface);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
 }

 .portfolio-item img {
     width: 100%;
     height: 200px;
     object-fit: cover;
     transition: var(--transition);
 }

 .portfolio-item:hover img {
     transform: scale(1.05);
 }

 .portfolio-info {
     padding: 1.5rem;
 }

 .dark-mode .portfolio-info {
     color: var(--dark-text);
 }

 .portfolio-info h3 {
     margin-bottom: 0.5rem;
     font-size: 1.25rem;
 }

 /* Services */
 .services-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 2rem;
     text-align: center;
 }

 .service-card {
     background: white;
     padding: 2rem;
     border-radius: 8px;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
     transition: var(--transition);
     transform: scale(0.95);
     opacity: 0;
     position: relative;
     overflow: hidden;
     z-index: 1;
 }

 .service-card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 5px;
     background: var(--primary);
     transition: height 0.3s var(--ease-out);
     z-index: -1;
 }

 .service-card:hover::before {
     height: 100%;
 }

 .service-card.visible {
     animation: scaleIn 0.6s var(--ease-out) forwards;
 }

 .service-card:hover {
     transform: scale(1.03) !important;
     color: white;
 }

 .service-card:hover h3,
 .service-card:hover p,
 .service-card:hover strong {
     color: white;
 }

 .dark-mode .service-card {
     background: var(--dark-surface);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
 }

 .service-card h3 {
     margin: 1rem 0;
     transition: color 0.3s;
 }

 .service-card p {
     transition: color 0.3s;
 }

 .service-card strong {
     transition: color 0.3s;
 }

 /* Testimonials */
 .testimonials-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     gap: 2rem;
 }

 .testimonial {
     background: white;
     padding: 2rem;
     border-radius: 8px;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
     border-top: 4px solid var(--primary);
     transition: var(--transition);
     transform: translateY(20px);
     opacity: 0;
 }

 .testimonial.visible {
     animation: fadeUp 0.6s var(--ease-out) forwards;
 }

 .testimonial:hover {
     transform: translateY(-5px) !important;
 }

 .dark-mode .testimonial {
     background: var(--dark-surface);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
 }

 .testimonial p {
     font-style: italic;
     margin-bottom: 1rem;
     position: relative;
     padding-left: 1.5rem;
 }

 .testimonial p::before {
     content: '"';
     position: absolute;
     left: 0;
     top: -0.5rem;
     font-size: 2rem;
     color: var(--primary);
     opacity: 0.3;
 }

 .testimonial-author {
     font-weight: 700;
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .testimonial-author::before {
     content: '';
     display: block;
     width: 20px;
     height: 2px;
     background: var(--primary);
 }

 /* ===== Enhanced Form Styles ===== */
 #contact-form {
     max-width: 600px;
     margin: 0 auto;
     padding: 2rem;
     background: white;
     border-radius: 12px;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
     transition: all 0.4s var(--ease-out);
 }

 .dark-mode #contact-form {
     background: var(--dark-surface);
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
 }

 .form-group {
     position: relative;
     margin-bottom: 1.5rem;
 }

 #contact-form label {
     position: absolute;
     left: 1rem;
     top: 1rem;
     padding: 0 0.5rem;
     background: inherit;
     color: var(--gray);
     transition: all 0.3s var(--ease-out);
     pointer-events: none;
     border-radius: 4px;
 }

 .dark-mode #contact-form label {
     color: var(--gray-dark);
 }

 #contact-form input,
 #contact-form textarea {
     width: 100%;
     padding: 1.2rem;
     border: 2px solid #e0e0e0;
     border-radius: 8px;
     font-size: 1rem;
     transition: all 0.3s var(--ease-out);
     background: transparent;
 }

 .dark-mode #contact-form input,
 .dark-mode #contact-form textarea {
     border-color: #444;
     color: var(--dark-text);
 }

 #contact-form input:focus,
 #contact-form textarea:focus {
     outline: none;
     border-color: var(--primary);
     box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
 }

 .dark-mode #contact-form input:focus,
 .dark-mode #contact-form textarea:focus {
     box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
 }

 #contact-form textarea {
     min-height: 160px;
     resize: vertical;
 }

 /* Floating label effect */
 #contact-form input:focus+label,
 #contact-form textarea:focus+label,
 #contact-form input:not(:placeholder-shown)+label,
 #contact-form textarea:not(:placeholder-shown)+label {
     transform: translateY(-1.8rem) scale(0.85);
     color: var(--primary);
     background: inherit;
     font-weight: 600;
 }

 /* Success message */
 #form-success {
     display: none;
     padding: 1rem;
     margin-top: 1.5rem;
     background: rgba(67, 97, 238, 0.1);
     border-radius: 8px;
     color: var(--primary);
     text-align: center;
     animation: fadeIn 0.5s ease-out;
 }

 .dark-mode #form-success {
     background: rgba(67, 97, 238, 0.2);
 }

 #form-success i {
     margin-right: 0.5rem;
 }

 /* Submit button adjustments */
 #contact-form .btn {
     width: 100%;
     padding: 1.1rem;
     font-size: 1.1rem;
     margin-top: 0.5rem;
 }

 /* Mobile responsiveness */
 @media (max-width: 768px) {
     #contact-form {
         padding: 1.5rem;
     }

     #contact-form input,
     #contact-form textarea {
         padding: 1rem;
     }
 }

 /* Footer */
 footer {
     text-align: center;
     padding: 3rem;
     color: var(--gray);
 }

 .dark-mode footer {
     color: var(--gray-dark);
 }

 /* Animations */
 @keyframes fadeIn {
     to {
         opacity: 1;
     }
 }

 @keyframes fadeUp {
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 @keyframes scaleIn {
     to {
         opacity: 1;
         transform: scale(1);
     }
 }

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

     100% {
         transform: scale(1.2);
         opacity: 0.4;
     }
 }

 /* Animated background elements */
 .bg-shape {
     position: absolute;
     border-radius: 50%;
     filter: blur(60px);
     opacity: 0.2;
     z-index: -1;
 }

 .shape-1 {
     width: 300px;
     height: 300px;
     background: var(--primary);
     top: -100px;
     left: -100px;
     animation: float 15s infinite alternate var(--ease-out);
 }

 .shape-2 {
     width: 200px;
     height: 200px;
     background: var(--secondary);
     bottom: -50px;
     right: -50px;
     animation: float 12s 2s infinite alternate-reverse var(--ease-out);
 }

 @keyframes float {
     0% {
         transform: translate(0, 0) rotate(0deg);
     }

     100% {
         transform: translate(50px, 50px) rotate(5deg);
     }
 }

 /* Mobile */
 @media (max-width: 768px) {
     section {
         padding: 4rem 5%;
     }

     .hero {
         padding: 3rem 0 4rem;
     }

     .theme-toggle {
         top: 1rem;
         right: 1rem;
         width: 2rem;
         height: 2rem;
     }

     .skills-grid {
         grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
     }

     .shape-1,
     .shape-2 {
         display: none;
     }
 }