:root {
      --primary: #4ade80;
      --secondary: #1f2937;
      --light: #f9fafb;
      --accent: #6ee7b7;
      --bg-dark: #0f172a;
      --glass: rgba(255, 255, 255, 0.05);
      --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Poppins', sans-serif;
      background: var(--bg-dark);
      color: var(--light);
      line-height: 1.6;
      overflow-x: hidden;
      position: relative;
    }

    /* Loading Animation */
    .loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: var(--bg-dark);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity 0.5s ease;
    }

    .loader.hidden {
      opacity: 0;
      pointer-events: none;
    }

    .loader-content {
      text-align: center;
    }

    .spinner {
      width: 50px;
      height: 50px;
      border: 4px solid rgba(78, 222, 128, 0.3);
      border-top: 4px solid var(--primary);
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin: 0 auto 20px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* Animated Background */
    .animated-bg {
      position: fixed;
      width: 100%;
      height: 100%;
      background: radial-gradient(circle at 20% 20%, #334155 0%, transparent 50%),
                  radial-gradient(circle at 80% 80%, #1e293b 0%, transparent 50%),
                  radial-gradient(circle at 40% 70%, #374151 0%, transparent 50%);
      animation: bgMove 25s ease-in-out infinite;
      z-index: -1;
    }

    @keyframes bgMove {
      0%, 100% { 
        background-position: 0% 0%, 100% 100%, 50% 50%; 
        filter: hue-rotate(0deg);
      }
      33% { 
        background-position: 100% 0%, 0% 100%, 80% 20%; 
        filter: hue-rotate(60deg);
      }
      66% { 
        background-position: 50% 100%, 50% 0%, 20% 80%; 
        filter: hue-rotate(120deg);
      }
    }

    /* Floating particles */
    .particles {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: -1;
    }

    .particle {
      position: absolute;
      width: 4px;
      height: 4px;
      background: var(--primary);
      border-radius: 50%;
      opacity: 0.6;
      animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(-20px) rotate(180deg); }
    }

    /* Header Animations */
    header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(15, 23, 42, 0.9);
      backdrop-filter: blur(15px);
      padding: 1.5rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 2px 20px rgba(0,0,0,0.5);
      animation: slideDown 0.8s ease-out;
      border-bottom: 1px solid rgba(78, 222, 128, 0.2);
    }

    @keyframes slideDown {
      from { 
        transform: translateY(-100%); 
        opacity: 0;
      }
      to { 
        transform: translateY(0); 
        opacity: 1;
      }
    }

    header h1 {
      color: var(--primary);
      font-size: 1.8rem;
      font-weight: 700;
      position: relative;
      overflow: hidden;
    }

    header h1::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: -100%;
      width: 100%;
      height: 2px;
      background: var(--gradient);
      animation: underlineSlide 2s ease-out 0.5s forwards;
    }

    @keyframes underlineSlide {
      to { left: 0; }
    }

    nav a {
      margin-left: 2rem;
      color: var(--light);
      text-decoration: none;
      font-weight: 500;
      position: relative;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      padding: 0.5rem 0;
    }

    nav a::before {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      width: 0;
      height: 2px;
      background: var(--primary);
      transition: all 0.3s ease;
      transform: translateX(-50%);
    }

    nav a:hover::before { width: 100%; }

    nav a:hover {
      color: var(--primary);
      transform: translateY(-2px);
    }

    /* Hero Section Animations */
    .hero {
      height: 100vh;
      background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6)),
                  url('https://images.unsplash.com/photo-1685558593626-686907d7ee4b?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 2rem;
      position: relative;
      color: white;
    }

    .hero-content {
      background: rgba(15, 23, 42, 0.7);
      padding: 3rem;
      border-radius: 20px;
      backdrop-filter: blur(15px);
      border: 1px solid rgba(78, 222, 128, 0.3);
      animation: heroFadeIn 1.2s ease-out 0.5s both;
      position: relative;
      overflow: hidden;
    }

    .hero-content::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: conic-gradient(from 0deg, transparent, rgba(78, 222, 128, 0.1), transparent);
      animation: rotate 20s linear infinite;
      z-index: -1;
    }

    @keyframes rotate {
      100% { transform: rotate(360deg); }
    }

    @keyframes heroFadeIn {
      from { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9);
      }
      to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
      }
    }

    .hero h1 {
      font-size: 3.5rem;
      margin-bottom: 1rem;
      font-weight: 700;
      background: linear-gradient(135deg, #fff, var(--primary));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: textGlow 2s ease-in-out infinite alternate;
    }

    @keyframes textGlow {
      from { filter: drop-shadow(0 0 5px rgba(78, 222, 128, 0.5)); }
      to { filter: drop-shadow(0 0 20px rgba(78, 222, 128, 0.8)); }
    }

    .hero p {
      font-size: 1.3rem;
      margin-bottom: 2rem;
      animation: slideUp 1s ease-out 0.8s both;
    }

    @keyframes slideUp {
      from { 
        opacity: 0; 
        transform: translateY(30px);
      }
      to { 
        opacity: 1; 
        transform: translateY(0);
      }
    }

    .hero .btn {
      display: inline-block;
      padding: 1rem 2rem;
      background: var(--gradient);
      color: white;
      border-radius: 50px;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      animation: buttonBounce 1.2s ease-out 1.2s both;
      position: relative;
      overflow: hidden;
    }

    .hero .btn::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;
      transition: all 0.5s ease;
      transform: translate(-50%, -50%);
    }

    .hero .btn:hover::before {
      width: 300px;
      height: 300px;
    }

    .hero .btn:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(78, 222, 128, 0.4);
    }

    @keyframes buttonBounce {
      from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.8);
      }
      60% { 
        transform: translateY(-10px) scale(1.05);
      }
      to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
      }
    }

    /* Section Animations */
    section {
      padding: 5rem 2rem;
      opacity: 0;
      transform: translateY(50px);
      transition: all 0.8s ease;
    }

    section.animate {
      opacity: 1;
      transform: translateY(0);
    }

    .section-title {
      font-size: 3rem;
      color: var(--primary);
      margin-bottom: 3rem;
      text-align: center;
      font-weight: 700;
      position: relative;
      animation: titlePulse 2s ease-in-out infinite alternate;
    }

    @keyframes titlePulse {
      from { text-shadow: 0 0 10px rgba(78, 222, 128, 0.5); }
      to { text-shadow: 0 0 20px rgba(78, 222, 128, 0.8); }
    }

    .section-title::after {
      content: '';
      position: absolute;
      bottom: -10px;
      left: 50%;
      width: 100px;
      height: 3px;
      background: var(--gradient);
      transform: translateX(-50%);
      border-radius: 2px;
    }

    /* Card Animations */
    .card-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(350px, 1fr));
      gap: 2rem;
      max-width: 1200px;
      margin: 0 auto;
    }

    .card {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      padding: 2rem;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(78, 222, 128, 0.2);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      opacity: 0;
      transform: translateY(50px) rotateX(15deg);
      animation: cardSlideIn 0.8s ease-out forwards;
      position: relative;
      overflow: hidden;
    }

    .card:nth-child(1) { animation-delay: 0.1s; }
    .card:nth-child(2) { animation-delay: 0.2s; }
    .card:nth-child(3) { animation-delay: 0.3s; }
    .card:nth-child(4) { animation-delay: 0.4s; }
    .card:nth-child(5) { animation-delay: 0.5s; }
    .card:nth-child(6) { animation-delay: 0.6s; }

    @keyframes cardSlideIn {
      to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
      }
    }

    .card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(78, 222, 128, 0.1), transparent);
      transition: left 0.8s ease;
    }

    .card:hover::before {
      left: 100%;
    }

    .card:hover {
      transform: translateY(-15px) scale(1.02);
      box-shadow: 0 20px 40px rgba(78, 222, 128, 0.2);
      border-color: var(--primary);
    }

    .card img {
      width: 100%;
      height: 200px;
      object-fit: cover;
      border-radius: 15px;
      margin-bottom: 1.5rem;
      transition: transform 0.4s ease;
    }

    .card:hover img {
      transform: scale(1.05);
    }

    .card h4 {
      color: var(--primary);
      margin-bottom: 1rem;
      font-size: 1.3rem;
      font-weight: 600;
      transition: color 0.3s ease;
    }

    .card:hover h4 {
      color: var(--accent);
    }

    .card ul li {
      margin: 0.5rem 0;
      padding-left: 1rem;
      position: relative;
    }

    .card ul li::before {
      content: '▸';
      position: absolute;
      left: 0;
      color: var(--primary);
      font-weight: bold;
    }

    /* Skills Section */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
      gap: 2rem;
      max-width: 800px;
      margin: 0 auto;
      
    }

    .skills-grid > div {
      background: rgba(255, 255, 255, 0.05);
      padding: 2rem;
      border-radius: 15px;
      text-align: center;
      border: 1px solid rgba(78, 222, 128, 0.3);
      transition: all 0.4s ease;
      position: relative;
      overflow: hidden;
    }

    .skills-grid > div::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 130%;
      height: 8px;
      background: var(--gradient);
      transform: scaleX(0);
      transition: transform 0.4s ease;
    }

    .skills-grid > div:hover::after {
      transform: scaleX(1);
    }

    .skills-grid > div:hover {
      transform: translateY(-10px);
      box-shadow: 0 15px 30px rgba(78, 222, 128, 0.2);
    }

    /* Education Section */
    .education-block {
      max-width: 800px;
      margin: 0 auto;
    }

    .education-block > div {
      background: rgba(255, 255, 255, 0.05);
      margin-bottom: 2rem;
      padding: 2rem;
      border-radius: 15px;
      border-left: 4px solid var(--primary);
      transition: all 0.4s ease;
      position: relative;
    }

    .education-block > div::before {
      content: '';
      position: absolute;
      left: -4px;
      top: 0;
      width: 4px;
      height: 0;
      background: var(--accent);
      transition: height 0.4s ease;
    }

    .education-block > div:hover::before {
      height: 100%;
    }

    .education-block > div:hover {
      transform: translateX(10px);
      background: rgba(78, 222, 128, 0.1);
    }

    /* Contact Section */
    .contact-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 2rem;
      max-width: 800px;
      margin: 0 auto;
    }

    .contact-grid a {
      display: block;
      background: rgba(255, 255, 255, 0.05);
      padding: 2rem;
      border-radius: 15px;
      text-decoration: none;
      color: var(--light);
      text-align: center;
      border: 1px solid rgba(78, 222, 128, 0.3);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }

    .contact-grid a::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: radial-gradient(circle, rgba(78, 222, 128, 0.2), transparent);
      border-radius: 50%;
      transition: all 0.5s ease;
      transform: translate(-50%, -50%);
    }

    .contact-grid a:hover::before {
      width: 300px;
      height: 300px;
    }

    .contact-grid a:hover {
      transform: translateY(-10px) scale(1.05);
      color: var(--primary);
      border-color: var(--primary);
      box-shadow: 0 15px 30px rgba(78, 222, 128, 0.3);
    }

    /* Footer */
    footer {
      background: rgba(15, 23, 42, 0.9);
      text-align: center;
      padding: 2rem;
      border-top: 1px solid rgba(78, 222, 128, 0.3);
      animation: fadeInUp 0.8s ease-out;
    }

    @keyframes fadeInUp {
      from { 
        opacity: 0; 
        transform: translateY(50px);
      }
      to { 
        opacity: 1; 
        transform: translateY(0);
      }
    }

    /* Scroll Progress Bar */
    .scroll-progress {
      position: fixed;
      top: 0;
      left: 0;
      width: 0%;
      height: 3px;
      background: var(--gradient);
      z-index: 1000;
      transition: width 0.1s ease;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      .hero h1 { font-size: 2.5rem; }
      .section-title { font-size: 2rem; }
      nav a { margin-left: 1rem; }
      .card-grid { grid-template-columns: 1fr; }
      section { padding: 3rem 1rem; }
    }

    /* Reduced Motion */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
