/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #f8fafc;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.profile-icon {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.name {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-bottom: 2rem;
}

.hero-decoration {
    width: 100px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 2rem auto;
    border-radius: 2px;
    box-shadow: var(--shadow-medium);
}

/* Media Section (Image + QR Code) */
.media-section {
    padding: 3rem 2rem;
    background: var(--card-background);
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
}

.media-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    transition: transform 0.3s ease;
}

.image-container:hover {
    transform: translateY(-5px);
}

.profile-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-container:hover .profile-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.image-overlay:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.1);
}

.qr-container {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    border: 2px dashed var(--primary-color);
    transition: all 0.3s ease;
}

.qr-container:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.qr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.qr-header i {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.qr-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.qr-canvas {
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1rem;
    background: white;
    padding: 10px;
}

.qr-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.info-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.card-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-medium);
}

.info-item:hover::before {
    width: 8px;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-label i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 2rem;
}

.category-b {
    color: var(--accent-color);
    font-weight: 700;
}

.certification-section {
    background: var(--gradient-primary);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certification-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.certification-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.certification-badge i {
    font-size: 3rem;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.certification-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.certification-text p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 500px;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.fade-in.animate,
.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-image {
        height: 300px;
    }
    
    .qr-container {
        padding: 1.5rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .info-card {
        padding: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .certification-badge {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .info-item {
        padding: 1.5rem;
    }
}

/* QR Code Error and Placeholder Styles */
.qr-error {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 2px dashed #ef4444;
}

.qr-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(37, 99, 235, 0.05);
    border-radius: 12px;
    border: 2px dashed var(--primary);
}

.qr-placeholder p {
    margin-top: 15px;
    font-size: 0.9rem;
}