/* Modern Link Tree Styles */
* {
    box-sizing: border-box;
}

:root {
    --brand-blue: #1b75bb;
    --brand-orange: #ff8c00;
    --soft-green: #6b8e65;
    --warm-beige: #f5f1eb;
    --charcoal: #2d3748;
    --light-gray: #f7fafc;
    --medium-gray: #718096;
    --success-green: #48bb78;
    --warning-orange: #ed8936;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    --border-radius: 12px;
    --shadow-card: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    
    --font-size-h1: clamp(32px, 8vw, 40px);
    --font-size-h2: clamp(28px, 6vw, 32px);
    --font-size-card-title: clamp(18px, 4vw, 20px);
    --font-size-card-desc: clamp(14px, 3.5vw, 16px);
    --font-size-body: 16px;
    --font-size-caption: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--warm-beige) 0%, var(--light-gray) 100%);
    color: var(--charcoal);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Header Section */
.header {
    text-align: center;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.profile-image {
    width: clamp(250px, 30vw, 320px);
    height: clamp(250px, 30vw, 320px);
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 4px solid white;
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-md);
    /* Ensure high quality scaling */
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
}

.brand-name {
    font-size: var(--font-size-h1);
    font-weight: bold;
    color: var(--brand-blue);
    margin: 0 0 var(--spacing-sm);
}

.tagline {
    font-size: 18px;
    color: var(--medium-gray);
    margin: 0 0 var(--spacing-lg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--brand-blue);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.social-btn ion-icon {
    font-size: 24px;
}

/* Hero Video Section */
.hero-section {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.video-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    max-width: clamp(400px, 50vw, 700px);
    margin-left: auto;
    margin-right: auto;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: clamp(280px, 35vw, 450px);
    object-fit: contain;
}

.video-caption {
    font-size: var(--font-size-caption);
    color: var(--medium-gray);
    margin-top: var(--spacing-sm);
}

/* Brand Differentiation Sections */
.brand-section {
    margin-bottom: calc(var(--spacing-xl) * 2);
    padding: var(--spacing-xl) 0;
    border-radius: calc(var(--border-radius) * 2);
}

.brand-section.technical {
    background: rgba(27, 117, 187, 0.03);
}

.brand-section.motivational {
    background: rgba(27, 117, 187, 0.03);
}

.brand-section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.brand-section-title {
    font-size: clamp(28px, 7vw, 36px);
    font-weight: bold;
    margin: 0 0 var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.brand-section.technical .brand-section-title {
    color: var(--brand-blue);
}

.brand-section.motivational .brand-section-title {
    color: var(--brand-blue);
}

.brand-section-subtitle {
    font-size: 16px;
    color: var(--medium-gray);
    margin: 0 0 var(--spacing-lg);
}

.brand-section-icon {
    font-size: 32px;
}

/* Section Headers */
.section {
    margin-bottom: calc(var(--spacing-lg) * 1.5);
}

.section-title {
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 700;
    text-align: center;
    margin: 0 0 var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: var(--spacing-md) 0;
}

.technical .section-title {
    color: var(--brand-blue);
}

.motivational .section-title {
    color: var(--brand-blue);
}

/* Service Cards */
.service-cards {
    display: grid;
    gap: var(--spacing-md);
    width: 100%;
    max-width: clamp(400px, 50vw, 700px);
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    min-height: 80px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

/* FREE Badge Styles */
.free-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success-green);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(72, 187, 120, 0.3);
    z-index: 1;
}

.new-launch-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--brand-orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(255, 140, 0, 0.4);
    z-index: 1;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 1px 3px rgba(255, 140, 0, 0.4); 
    }
    50% { 
        box-shadow: 0 2px 8px rgba(255, 140, 0, 0.6), 0 0 0 1px rgba(255, 140, 0, 0.3); 
    }
}

.service-card.featured {
    border: 2px solid var(--brand-blue);
    box-shadow: 0 4px 16px rgba(27, 117, 187, 0.15);
}

.service-card.featured:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 8px 24px rgba(27, 117, 187, 0.2);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 28px;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    padding: 8px;
    border-radius: 50%;
    background: var(--light-gray);
    transition: all 0.2s ease;
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: var(--font-size-card-title);
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--charcoal);
    letter-spacing: 0.5px;
}

.service-description {
    font-size: var(--font-size-card-desc);
    color: var(--medium-gray);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.service-arrow {
    font-size: 20px;
    color: var(--medium-gray);
    margin-left: var(--spacing-sm);
    flex-shrink: 0;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--brand-blue);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: var(--medium-gray);
    font-size: var(--font-size-caption);
}

.footer p {
    margin: 0 0 var(--spacing-sm);
}

/* Responsive Design */
@media (max-width: 480px) {
    .profile-image {
        width: clamp(200px, 28vw, 240px);
        height: clamp(200px, 28vw, 240px);
    }
    
    .free-badge,
    .new-launch-badge {
        font-size: 9px;
        padding: 3px 6px;
        top: 6px;
        right: 6px;
    }
}

@media (min-width: 768px) {
    .service-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .container {
        padding: var(--spacing-lg);
    }
    
    .profile-image {
        width: clamp(240px, 28vw, 300px);
        height: clamp(240px, 28vw, 300px);
    }
    
    /* Enhanced scaling for tablet screens */
    .video-container,
    .service-cards {
        max-width: clamp(450px, 55vw, 650px);
    }
}

@media (min-width: 1024px) {
    .brand-section {
        padding: calc(var(--spacing-xl) * 1.5) var(--spacing-lg);
        margin: 0 calc(var(--spacing-md) * -1) var(--spacing-xl);
    }
    
    .service-cards.three-col {
        grid-template-columns: 1fr;
    }
    
    .profile-image {
        width: clamp(270px, 26vw, 320px);
        height: clamp(270px, 26vw, 320px);
    }
    
    /* Optimized scaling for desktop screens */
    .video-container,
    .service-cards {
        max-width: clamp(500px, 45vw, 700px);
    }
}

@media (min-width: 1200px) {
    /* Enhanced scaling for large desktop screens */
    .video-container,
    .service-cards {
        max-width: clamp(550px, 40vw, 700px);
    }
    
    .video-container video {
        max-height: clamp(350px, 28vw, 450px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.service-card:focus-visible,
.social-btn:focus-visible {
    outline: 3px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --warm-beige: #1a1a1a;
        --light-gray: #2d2d2d;
        --charcoal: #ffffff;
        --medium-gray: #a0a0a0;
    }
    
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .service-card,
    .video-container {
        background: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .brand-section.technical {
        background: linear-gradient(135deg, #1a2332 0%, #2d2d2d 100%);
    }
    
    .brand-section.motivational {
        background: linear-gradient(135deg, #1a2332 0%, #2d2d2d 100%);
    }
}

/* Safe area support for notched devices */
.container {
    padding-left: max(var(--spacing-md), env(safe-area-inset-left));
    padding-right: max(var(--spacing-md), env(safe-area-inset-right));
}

.header {
    padding-top: max(var(--spacing-xl), env(safe-area-inset-top) + var(--spacing-md));
}

.footer {
    padding-bottom: max(var(--spacing-xl), env(safe-area-inset-bottom) + var(--spacing-md));
}
