/* ========================================
   MOEIN GHAEINI - STYLISH BUSINESS CARD
   ======================================== */

/* CSS Variables for Theme */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper touch targets on mobile */
button, a, input, textarea, select {
    min-height: 44px;
    min-width: 44px;
}

/* Improve touch interactions */
.social-links a, .btn {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    touch-action: manipulation;
}

/* Prevent zoom on input focus on iOS */
input, textarea, select {
    font-size: 16px;
}

/* Better touch feedback */
.social-links a:active, .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Improve text rendering on mobile */
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(20px); }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 2rem 0;
}

/* Business Card */
.business-card {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 
        0 25px 50px var(--shadow-color),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(0.5deg); }
    50% { transform: translateY(-5px) rotate(-0.5deg); }
    75% { transform: translateY(-15px) rotate(0.3deg); }
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: -1;
}

.business-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: rotate 10s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Profile Image */
.profile-image {
    position: relative;
    display: inline-block;
}

.profile-image img {
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 
        0 0 0 8px rgba(102, 126, 234, 0.2),
        0 20px 40px var(--shadow-color);
    transition: var(--transition);
    position: relative;
    z-index: 2;
    will-change: transform;
    transform-origin: center center;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

.profile-image:hover img {
    transform: scale(1.05);
    box-shadow: 
        0 0 0 12px rgba(102, 126, 234, 0.3),
        0 30px 60px var(--shadow-color);
}


/* Typography */
.display-4 {
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    background: var(--gradient-primary);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Cards */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-color);
    border-color: var(--primary-color);
}

.card-body {
    padding: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--bg-glass);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.social-links a:hover::before {
    left: 100%;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

/* Individual social media colors on hover */
.social-links a[aria-label="LinkedIn"]:hover {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.social-links a[aria-label="GitHub"]:hover {
    background: linear-gradient(135deg, #333, #000);
}

.social-links a[aria-label="X (Twitter)"]:hover {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.social-links a[aria-label="Email"]:hover {
    background: linear-gradient(135deg, #ea4335, #d33b2c);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop Screens (1200px and up) */
@media (min-width: 1200px) {
    .business-card {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .display-4 {
        font-size: 3.5rem;
    }
    
    .profile-image img {
        width: 180px;
        height: 180px;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-links a {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
}

/* Desktop Screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .business-card {
        max-width: 550px;
        margin: 0 auto;
    }
    
    .display-4 {
        font-size: 3rem;
    }
    
    .profile-image img {
        width: 160px;
        height: 160px;
    }
}

/* Tablet Screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .business-card {
        margin: 2rem 1rem;
        max-width: 500px;
    }
    
    .display-4 {
        font-size: 2.8rem;
    }
    
    .h4 {
        font-size: 1.3rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .profile-image img {
        width: 140px;
        height: 140px;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-links a {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .business-card {
        margin: 1.5rem 0.5rem;
        max-width: 450px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .h4 {
        font-size: 1.2rem;
    }
    
    .lead {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .profile-image img {
        width: 120px;
        height: 120px;
    }
    
    .social-links {
        gap: 0.7rem !important;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
    
    .business-card .card-body {
        padding: 2rem !important;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .business-card {
        margin: 1rem 0.5rem;
        max-width: 100%;
        border-radius: 20px;
    }
    
    /* Improve touch targets on small screens */
    .social-links a {
        min-width: 48px;
        min-height: 48px;
    }
    
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
    
    .display-4 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }
    
    .h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .lead {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .profile-image {
        margin-bottom: 1.5rem;
    }
    
    .profile-image img {
        width: 100px;
        height: 100px;
    }
    
    .social-links {
        gap: 0.6rem !important;
        margin-bottom: 1.5rem;
    }
    
    .social-links a {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .business-card .card-body {
        padding: 1.5rem !important;
    }
    
    /* Adjust hero section for mobile */
    .hero-section {
        padding: 1rem 0;
        min-height: 100vh;
    }
    
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .business-card {
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .h4 {
        font-size: 1rem;
    }
    
    .lead {
        font-size: 0.9rem;
    }
    
    .profile-image img {
        width: 90px;
        height: 90px;
    }
    
    .social-links {
        gap: 0.5rem !important;
    }
    
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .business-card .card-body {
        padding: 1.2rem !important;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .business-card {
        margin: 0.5rem;
    }
    
    .profile-image img {
        width: 80px;
        height: 80px;
    }
    
    .display-4 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .lead {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .social-links {
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .business-card {
        animation: none;
    }
    
    .profile-image::before {
        animation: none;
    }
    
    .business-card::after {
        animation: none;
    }
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}




/* Print Styles */
@media print {
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .business-card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}