/* ================================
   Apple App Store Premium Design
   iOS 16+ Style with Modern Aesthetics
   ================================ */

:root {
    /* iOS Colors */
    --ios-bg: #000000;
    --ios-surface: #1c1c1e;
    --ios-elevated: #2c2c2e;
    --ios-text-primary: #ffffff;
    --ios-text-secondary: #8e8e93;
    --ios-text-tertiary: #636366;
    --ios-separator: rgba(84, 84, 88, 0.65);
    
    /* Accent Colors */
    --ios-blue: #007aff;
    --ios-blue-pressed: #0051d5;
    --ios-green: #34c759;
    --ios-purple: #af52de;
    --ios-pink: #ff2d55;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #1c1c1e 100%);
    
    /* Spacing */
    --spacing-2: 2px;
    --spacing-4: 4px;
    --spacing-8: 8px;
    --spacing-12: 12px;
    --spacing-16: 16px;
    --spacing-20: 20px;
    --spacing-24: 24px;
    --spacing-32: 32px;
    
    /* Border Radius */
    --radius-8: 8px;
    --radius-12: 12px;
    --radius-16: 16px;
    --radius-20: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    
    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-system);
    background: var(--ios-bg);
    color: var(--ios-text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ================================
   App Container (iPhone Frame)
   ================================ */

.app-container {
    max-width: 430px;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--ios-bg);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ================================
   Status Bar (iOS 16+)
   ================================ */

.status-bar {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-20);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ios-bg);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.time {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.3px;
}

.status-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.dynamic-island {
    width: 126px;
    height: 37px;
    background: var(--ios-bg);
    border-radius: 20px;
    border: 2px solid var(--ios-elevated);
}

.status-right i {
    font-size: 13px;
    color: var(--ios-text-primary);
}

/* ================================
   Main Content
   ================================ */

.main-content {
    padding-bottom: 40px;
}

/* ================================
   Hero Gradient Background
   ================================ */

.hero-gradient {
    height: 320px;
    position: relative;
    overflow: hidden;
}

.gradient-overlay {
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    position: absolute;
    top: 0;
    left: 0;
}

/* ================================
   Profile Card
   ================================ */

.profile-container {
    padding: 0 var(--spacing-16);
    margin-top: -200px;
    position: relative;
    z-index: 10;
}

.profile-card {
    background: var(--ios-surface);
    border-radius: var(--radius-20);
    padding: var(--spacing-32) var(--spacing-24);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.profile-image-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto var(--spacing-20);
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--ios-surface);
    box-shadow: var(--shadow-lg);
}

.profile-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.profile-name {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
    margin-bottom: var(--spacing-4);
}

.profile-subtitle {
    font-size: 17px;
    color: var(--ios-blue);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-4);
}

.profile-location {
    font-size: 15px;
    color: var(--ios-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-24);
}

/* ================================
   Stats Grid
   ================================ */

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: var(--spacing-16) 0;
    border-top: 1px solid var(--ios-separator);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
    margin-bottom: var(--spacing-4);
}

.stat-label {
    font-size: 13px;
    color: var(--ios-text-secondary);
    text-transform: capitalize;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--ios-separator);
}

/* ================================
   Action Buttons (iOS Style)
   ================================ */

.action-buttons {
    display: flex;
    gap: var(--spacing-12);
    margin: var(--spacing-16) 0 var(--spacing-24) 0;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: var(--radius-12);
    font-family: var(--font-system);
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-8);
}

.btn-primary {
    flex: 1;
    background: var(--ios-blue);
    color: white;
    padding: 14px var(--spacing-20);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}

.btn-primary:active {
    background: var(--ios-blue-pressed);
    transform: scale(0.98);
}

.btn-secondary {
    width: 50px;
    height: 50px;
    background: var(--ios-elevated);
    color: var(--ios-blue);
    padding: 0;
}

.btn-secondary:active {
    background: var(--ios-surface);
    transform: scale(0.95);
}

/* ================================
   Section Cards
   ================================ */

.section-card {
    background: var(--ios-surface);
    border-radius: var(--radius-20);
    padding: var(--spacing-20);
    margin-top: var(--spacing-16);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-16);
}

.section-title {
    font-size: 22px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
}

.badge-count {
    background: var(--ios-elevated);
    color: var(--ios-text-secondary);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ================================
   List Group (iOS Settings Style)
   ================================ */

.list-group {
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-16);
    padding: var(--spacing-12) var(--spacing-12);
    text-decoration: none;
    color: var(--ios-text-primary);
    border-radius: var(--radius-12);
    transition: background 0.2s;
    margin-bottom: var(--spacing-8);
}

.list-item:active {
    background: var(--ios-elevated);
}

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.linkedin { background: rgba(0, 119, 181, 0.2); color: #0077b5; }
.github { background: rgba(255, 255, 255, 0.1); color: white; }
.twitter { background: rgba(29, 161, 242, 0.2); color: #1da1f2; }
.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366); color: white; }
.whatsapp { background: rgba(37, 211, 102, 0.2); color: #25d366; }

.list-content {
    flex: 1;
}

.list-title {
    font-size: 17px;
    font-weight: var(--font-weight-medium);
    margin-bottom: 2px;
}

.list-subtitle {
    font-size: 15px;
    color: var(--ios-text-secondary);
}

.list-arrow {
    color: var(--ios-text-tertiary);
    font-size: 14px;
}

/* ================================
   Projects Horizontal Scroll
   ================================ */

.projects-scroll {
    display: flex;
    gap: var(--spacing-12);
    overflow-x: auto;
    padding-bottom: var(--spacing-8);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.projects-scroll::-webkit-scrollbar {
    display: none;
}

.project-card {
    min-width: 140px;
    background: var(--ios-elevated);
    border-radius: var(--radius-16);
    padding: var(--spacing-16);
    text-decoration: none;
    color: var(--ios-text-primary);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.project-card:active {
    transform: scale(0.95);
}

.project-card.featured {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border: 1px solid var(--ios-blue);
}

.project-icon {
    font-size: 40px;
    margin-bottom: var(--spacing-12);
}

.project-name {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-4);
}

.project-desc {
    font-size: 13px;
    color: var(--ios-text-secondary);
    line-height: 1.3;
}

.featured-badge {
    position: absolute;
    top: var(--spacing-8);
    right: var(--spacing-8);
    background: var(--ios-blue);
    color: white;
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    padding: 4px 8px;
    border-radius: var(--radius-8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   About Content
   ================================ */

.about-content {
    padding: var(--spacing-8) 0;
}

.about-text {
    font-size: 16px;
    color: var(--ios-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-16);
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-8);
}

.tag {
    background: var(--ios-elevated);
    color: var(--ios-text-secondary);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

/* ================================
   Footer
   ================================ */

.app-footer {
    text-align: center;
    padding: var(--spacing-32) var(--spacing-16);
    color: var(--ios-text-tertiary);
    font-size: 13px;
}

/* ================================
   Home Indicator
   ================================ */

.home-indicator {
    width: 140px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 430px) {
    .app-container {
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .app-container {
        margin: 2rem auto;
        border-radius: 40px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    }
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* ================================
   QR Code Modal
   ================================ */

.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.3s ease;
}

.qr-modal-content {
    position: relative;
    z-index: 1;
    background: var(--ios-surface);
    border-radius: var(--radius-20);
    max-width: 90%;
    width: 360px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-20);
    border-bottom: 1px solid var(--ios-separator);
}

.qr-modal-header h3 {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.qr-close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--ios-elevated);
    border: none;
    color: var(--ios-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qr-close-btn:active {
    background: var(--ios-bg);
    transform: scale(0.9);
}

.qr-modal-body {
    padding: var(--spacing-32) var(--spacing-20);
    text-align: center;
}

.qr-code-container {
    display: inline-block;
    padding: var(--spacing-20);
    background: white;
    border-radius: var(--radius-16);
    margin-bottom: var(--spacing-20);
}

.qr-code-container canvas,
.qr-code-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-description {
    font-size: 15px;
    color: var(--ios-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.qr-modal-footer {
    padding: var(--spacing-16) var(--spacing-20) var(--spacing-20);
    border-top: 1px solid var(--ios-separator);
}

.btn-download {
    width: 100%;
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: var(--radius-12);
    padding: 14px var(--spacing-20);
    font-family: var(--font-system);
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-8);
    transition: all 0.2s;
}

.btn-download:active {
    background: var(--ios-blue-pressed);
    transform: scale(0.98);
}
