/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --surface: #ffffff;
    --background: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 16px;
    --success: #10b981;
    --error: #ef4444;
    
    /* Animatsiya vaqtlari */
    --transition-fast: 150ms;
    --transition: 300ms;
    --transition-slow: 500ms;
    
    /* Animatsiya curve'lar */
    --ease-out: cubic-bezier(0, 0.55, 0.45, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================================================
   Base Animatsiyalar
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================================
   Page Transitions
   ========================================================================== */

.page {
    display: none;
    padding: 20px;
    padding-bottom: 80px;
    min-height: 100vh;
    opacity: 0;
    animation: pageEnter 0.6s var(--ease-out) forwards;
}

.page.active {
    display: block;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Splash Screen Loader
   ========================================================================== */

   .splash-loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: 
      radial-gradient(farthest-side, var(--primary) 95%, transparent) 
      50% 2px/14px 14px no-repeat,
      radial-gradient(farthest-side, transparent calc(100% - 16px), 
      rgba(37, 99, 235, 0.2) 0);
    animation: splashSpin 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto 25px auto;
    position: relative;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.15);
  }
  
  /* Smooth spin animation */
  @keyframes splashSpin {
    to { 
      transform: rotate(360deg);
    }
  }
  
  /* Pulse effect qo'shish */
  .splash-loader::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
      transparent,
      var(--primary-light),
      transparent
    );
    animation: splashSpin 2.5s infinite linear;
    opacity: 0.3;
    filter: blur(10px);
    z-index: -1;
  }
  
  /* Splash screen styling */
  .splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  }
  
  .splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
  }
  
  .splash-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    margin-top: 20px;
    letter-spacing: 0.5px;
    opacity: 0.9;
    animation: fadePulse 2s infinite ease-in-out;
  }
  
  @keyframes fadePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
  }
  
  /* Logo yoki avatar mavjud bo'lsa */
  .splash-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: bold;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
  }

/* ==========================================================================
   Hero Section Animatsiyalari
   ========================================================================== */

.hero {
    text-align: center;
    padding: 50px 20px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 0 0 30px 30px;
    margin: -20px -20px 30px -20px;
    position: relative;
    overflow: hidden;
    animation: heroEntrance 0.8s var(--ease-out) forwards;
    opacity: 0;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background animatsiyasi */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

/* Floating particles effect */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%
    );
    opacity: 0.5;
    animation: pulse 4s var(--ease-in-out) infinite;
}

.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
    animation: avatarAppear 0.8s var(--bounce) 0.3s forwards;
    opacity: 0;
    transform: scale(0);
}

@keyframes avatarAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    70% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.avatar:hover {
    animation: avatarHover 1.5s var(--ease-in-out) infinite;
}

@keyframes avatarHover {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

.hero h1 {
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    animation: titleSlideIn 0.6s var(--ease-out) 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes titleSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    opacity: 0.95;
    font-size: 17px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    animation: subtitleFadeIn 0.6s var(--ease-out) 0.6s forwards;
    opacity: 0;
}

@keyframes subtitleFadeIn {
    to {
        opacity: 0.95;
    }
}

/* ==========================================================================
   Stats Section Animatsiyalari
   ========================================================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0;
}

.stat {
    background: var(--surface);
    padding: 22px 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition) var(--ease-out);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: statAppear 0.6s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.stat:nth-child(1) { animation-delay: 0.7s; }
.stat:nth-child(2) { animation-delay: 0.9s; }
.stat:nth-child(3) { animation-delay: 1.1s; }

@keyframes statAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover shine effect */
.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(37, 99, 235, 0.1),
        transparent
    );
    transition: left var(--transition-slow);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat:hover::before {
    left: 100%;
}

.stat:active {
    transform: translateY(-2px);
    transition: transform var(--transition-fast);
}

/* Active click ripple effect */
.stat:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s linear;
}

.number {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    display: block;
    transition: all var(--transition) var(--ease-out);
}

.stat:hover .number {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition) var(--ease-out);
}

.stat:hover .label {
    color: var(--primary);
    letter-spacing: 0.8px;
}

/* ==========================================================================
   Button Animatsiyalari
   ========================================================================== */

.actions {
    display: flex;
    gap: 14px;
    margin: 35px 0;
    animation: actionsAppear 0.6s var(--ease-out) 1.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes actionsAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    flex: 1;
    padding: 18px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* Ripple effect for buttons */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn.primary:active {
    transform: translateY(-1px);
    transition: transform var(--transition-fast);
}

.btn.secondary {
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700;
}

.btn.secondary:hover {
    background: var(--background);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn.secondary:active {
    transform: translateY(-1px);
    transition: transform var(--transition-fast);
}

/* Button icon animatsiyalari */
.btn i {
    transition: transform var(--transition) var(--ease-out);
}

.btn:hover i {
    transform: translateX(5px);
}

.btn.secondary:hover i {
    transform: translateX(5px) rotate(15deg);
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: buttonSpinner 0.8s linear infinite;
}

@keyframes buttonSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Header Animatsiyalari
   ========================================================================== */

.header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
    padding-top: 10px;
    animation: headerSlideIn 0.5s var(--ease-out) forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes headerSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--background);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition) var(--ease-out);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

/* Hover shine effect */
.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(37, 99, 235, 0.1),
        transparent
    );
    transition: left var(--transition-slow);
}

.back-btn:hover {
    background: var(--border);
    transform: translateX(-3px);
}

.back-btn:hover::before {
    left: 100%;
}

.back-btn:active {
    transform: translateX(-1px) scale(0.95);
    transition: transform var(--transition-fast);
}

.back-btn i {
    transition: transform var(--transition) var(--ease-out);
}

.back-btn:hover i {
    transform: translateX(-3px);
}

.header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    animation: titlePulse 3s var(--ease-in-out) infinite;
}

@keyframes titlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ==========================================================================
   Project Cards Animatsiyalari
   ========================================================================== */

.projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition) var(--ease-out);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    animation: projectCardAppear 0.5s var(--ease-out) forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }

@keyframes projectCardAppear {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover gradient overlay */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.05) 0%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover {
    transform: translateY(-3px) translateX(3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:active {
    transform: translateY(-1px) translateX(1px);
    transition: transform var(--transition-fast);
}

.project-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: all var(--transition) var(--ease-out);
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.project-info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    transition: color var(--transition) var(--ease-out);
}

.project-card:hover .project-info h3 {
    color: var(--primary);
}

.project-info p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    transition: color var(--transition) var(--ease-out);
}

.project-card:hover .project-info p {
    color: var(--text);
}

.project-card i.fa-arrow-up-right-from-square {
    color: var(--text-light);
    font-size: 18px;
    opacity: 0.7;
    transition: all var(--transition) var(--ease-out);
}

.project-card:hover i.fa-arrow-up-right-from-square {
    opacity: 1;
    color: var(--primary);
    transform: translate(3px, -3px);
}

/* ==========================================================================
   Contact Form Animatsiyalari
   ========================================================================== */

.contact-form {
    margin-bottom: 45px;
    animation: formAppear 0.6s var(--ease-out) 0.3s forwards;
    opacity: 0;
}

@keyframes formAppear {
    to {
        opacity: 1;
    }
}

.input-group {
    margin-bottom: 22px;
    position: relative;
    animation: inputSlideUp 0.5s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(10px);
}

.input-group:nth-child(1) { animation-delay: 0.4s; }
.input-group:nth-child(2) { animation-delay: 0.6s; }
.input-group:nth-child(3) { animation-delay: 0.8s; }

@keyframes inputSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-label {
    position: relative;
    margin-bottom: 22px;
}

.floating-label-num {
    position: relative;
    margin-bottom: 22px;
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: all var(--transition) var(--ease-out);
    background: var(--surface);
    color: var(--text);
}

.floating-label-num input,
.floating-label-num textarea {
    width: 100%;
    padding: 18px 80px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: all var(--transition) var(--ease-out);
    background: var(--surface);
    color: var(--text);
}

.floating-label textarea {
    resize: vertical;
    min-height: 140px;
}

.floating-label-num textarea {
    resize: vertical;
    min-height: 140px;
}

.floating-label label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    transition: all var(--transition) var(--ease-out);
    background: var(--surface);
    padding: 0 4px;
}

.floating-label-num label {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    transition: all var(--transition) var(--ease-out);
    background: var(--surface);
    padding: 0 4px;
}

.floating-textarea label {
    top: 28px;
    transform: none;
}

/* Floating label states */
.floating-label input:focus + label,
.floating-label.has-value label,
.floating-label textarea:focus + label,
.floating-textarea.has-value label {
    top: 0;
    font-size: 14px;
    color: var(--primary);
    transform: translateY(-50%);
}

.floating-label-num input:focus + label,
.floating-label-num.has-value label,
.floating-label-num textarea:focus + label,
.floating-textarea.has-value label {
    top: 0;
    font-size: 14px;
    color: var(--primary);
    transform: translateX(-50%) translateY(-50%);
}

.floating-textarea textarea:focus + label,
.floating-textarea.has-value label {
    top: 0;
    transform: translateY(-50%);
}

.floating-label input:focus,
.floating-label textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.floating-label-num input:focus,
.floating-label-num textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Input shake animation on error */
.floating-label.error input,
.floating-label.error textarea {
    border-color: var(--error);
    animation: inputShake 0.5s var(--ease-out);
}

.floating-label-num.error input,
.floating-label-num.error textarea {
    border-color: var(--error);
    animation: inputShake 0.5s var(--ease-out);
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.country-code {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
    pointer-events: none;
    border-right: 2px solid var(--border);
    padding-right: 12px;
    height: 24px;
    display: flex;
    align-items: center;
    transition: all var(--transition) var(--ease-out);
}

.floating-label:has(input:focus) .country-code {
    color: var(--primary);
    border-right-color: var(--primary);
}

.floating-label input[type="tel"] {
    padding-left: 80px;
}

/* ==========================================================================
   Social Links Animatsiyalari
   ========================================================================== */

.social-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 35px;
    animation: socialLinksAppear 0.6s var(--ease-out) 1s forwards;
    opacity: 0;
}

@keyframes socialLinksAppear {
    to {
        opacity: 1;
    }
}

.social-link {
    width: 56px;
    height: 56px;
    background: var(--background);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    font-size: 22px;
    transition: all var(--transition) var(--ease-out);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: socialLinkBounce 0.5s var(--bounce) forwards;
    opacity: 0;
    transform: scale(0);
}

.social-link:nth-child(1) { animation-delay: 1.2s; }
.social-link:nth-child(2) { animation-delay: 1.4s; }
.social-link:nth-child(3) { animation-delay: 1.6s; }
.social-link:nth-child(4) { animation-delay: 1.8s; }

@keyframes socialLinkBounce {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover gradient background */
.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    opacity: 0;
    transition: opacity var(--transition);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:active {
    transform: translateY(-1px) scale(1.05);
    transition: transform var(--transition-fast);
}

.social-link i {
    position: relative;
    z-index: 1;
    transition: transform var(--transition) var(--ease-out);
}

.social-link:hover i {
    color: white;
    transform: rotate(10deg) scale(1.1);
}

/* Platform-specific hover effects */
.social-link[href*="linkedin"]:hover::before {
    background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.social-link[href*="telegram"]:hover::before {
    background: linear-gradient(135deg, #0088cc, #00a8e8);
}

.social-link[href*="twitter"]:hover::before {
    background: linear-gradient(135deg, #1da1f2, #1a91da);
}

.social-link[href*="instagram"]:hover::before {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

#loading.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .page {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero::before,
    .hero::after {
        animation: none !important;
    }
    
    .avatar:hover,
    .btn:hover,
    .stat:hover,
    .project-card:hover,
    .social-link:hover {
        transform: none !important;
        animation: none !important;
    }
    
    .btn i,
    .project-card i,
    .social-link i {
        transform: none !important;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 428px) {
    .page {
        padding: 18px;
        padding-bottom: 80px;
    }
    
    .hero {
        margin: -18px -18px 25px -18px;
        padding: 45px 18px 35px;
    }
    
    .stats {
        gap: 12px;
        margin: 35px 0;
    }
    
    .stat {
        padding: 20px 12px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Adjust animation delays for mobile */
    .stat:nth-child(1) { animation-delay: 0.4s; }
    .stat:nth-child(2) { animation-delay: 0.5s; }
    .stat:nth-child(3) { animation-delay: 0.6s; }
    
    .social-link:nth-child(1) { animation-delay: 0.8s; }
    .social-link:nth-child(2) { animation-delay: 0.9s; }
    .social-link:nth-child(3) { animation-delay: 1.0s; }
    .social-link:nth-child(4) { animation-delay: 1.1s; }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --surface: #1e293b;
        --background: #0f172a;
        --text: #f1f5f9;
        --text-light: #cbd5e1;
        --border: #334155;
        --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }
    
    .hero {
        background: linear-gradient(135deg, #1e40af, #1e3a8a);
    }
    
    .hero::before {
        background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 70%
        );
    }
    
    .btn.primary:hover,
    .btn.secondary:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
    
    .project-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    
    .social-link:hover {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .hero,
    .stats,
    .actions,
    .projects,
    .contact-form,
    .social-links {
        will-change: transform, opacity;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .page {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero::before,
    .hero::after {
        display: none !important;
    }
}