/**
 * Skill Farm Magazine Premium Styles
 * Luxury magazine-inspired design like Tatler & Vogue
 */

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

:root {
    /* Sophisticated Color Palette */
    --ivory: #FFFEF9;
    --pearl: #FAF8F3;
    --silk: #F5F2EA;
    --champagne: #E8E2D5;
    --cashmere: #D4CCBC;
    
    --charcoal: #1C1B1A;
    --graphite: #2D2C2A;
    --slate: #48463F;
    --stone: #6B6860;
    --ash: #95918A;
    
    --bronze: #8B7355;
    --copper: #A68B68;
    --gold: #C4A57B;
    --brass: #D4B896;
    
    --sage: #7A8471;
    --olive: #5F6B58;
    --forest: #3E4A3B;
    
    /* Typography */
    --font-display: 'Didot', 'Bodoni MT', 'Playfair Display', serif;
    --font-body: 'Helvetica Neue', 'Inter', -apple-system, sans-serif;
    --font-mono: 'Courier New', 'Courier', monospace;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-xxl: 96px;
    
    /* Shadows */
    --shadow-subtle: 0 2px 8px rgba(28, 27, 26, 0.04);
    --shadow-soft: 0 4px 16px rgba(28, 27, 26, 0.06);
    --shadow-medium: 0 8px 32px rgba(28, 27, 26, 0.08);
    --shadow-deep: 0 16px 48px rgba(28, 27, 26, 0.12);
    --shadow-luxury: 0 24px 64px rgba(28, 27, 26, 0.16);
}

/* Base Layout */
.skill-farm-wrapper {
    font-family: var(--font-body);
    background: var(--ivory);
    color: var(--charcoal);
    line-height: 1.6;
    min-height: 100vh;
    font-weight: 300;
    letter-spacing: 0.01em;
    position: relative;
}

.skill-farm-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: 
        linear-gradient(180deg, var(--ivory) 0%, var(--pearl) 50%, var(--silk) 100%);
    z-index: -1;
}

/* Magazine Header */
.sf-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--champagne);
    background: rgba(255, 254, 249, 0.95);
    backdrop-filter: blur(10px);
}

.sf-header-content {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sf-brand {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
}

.sf-brand-name {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--charcoal);
}

.sf-brand-tagline {
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
    font-weight: 400;
}

.sf-user-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sf-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--champagne);
}

.sf-user-details {
    text-align: right;
}

.sf-user-name {
    font-size: 15px;
    font-weight: 400;
    color: var(--charcoal);
}

.sf-user-role {
    font-size: 13px;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.sf-premium-indicator {
    padding: 6px 16px;
    background: var(--charcoal);
    color: var(--ivory);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 2px;
}

/* Main Container */
.sf-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* Two Column Layout */
.sf-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: var(--space-xl);
}

/* Journey Sidebar */
.sf-journey-sidebar {
    position: sticky;
    top: var(--space-lg);
    height: fit-content;
}

.sf-journey-card {
    background: white;
    border: 1px solid var(--champagne);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.sf-journey-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--champagne);
}

.sf-journey-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.sf-journey-subtitle {
    font-size: 13px;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.sf-journey-steps {
    padding: var(--space-md) 0;
}

.sf-step {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    position: relative;
    transition: background 0.3s ease;
}

.sf-step:hover {
    background: var(--pearl);
}

.sf-step-indicator {
    width: 32px;
    height: 32px;
    border: 1px solid var(--champagne);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--stone);
    flex-shrink: 0;
}

.sf-step.completed .sf-step-indicator {
    background: var(--charcoal);
    color: white;
    border-color: var(--charcoal);
}

.sf-step.active .sf-step-indicator {
    background: var(--bronze);
    color: white;
    border-color: var(--bronze);
}

.sf-step-content h4 {
    font-size: 15px;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.sf-step-content p {
    font-size: 13px;
    color: var(--stone);
}

/* Progress Metrics - Redesigned */
.sf-metrics {
    background: white;
    border: 1px solid #E8E6E1;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
}

.sf-metrics-header {
    padding: 24px 32px;
    background: linear-gradient(90deg, #1A2332 0%, #2A3442 100%);
}

.sf-metrics-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 300;
    color: white;
    letter-spacing: -0.01em;
}

.sf-metric-list {
    padding: 0;
}

.sf-metric-item {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F8F6F3;
    transition: background 0.2s ease;
}

.sf-metric-item:last-child {
    border-bottom: none;
}

.sf-metric-item:hover {
    background: #FAFAF8;
}

.sf-metric-label {
    font-size: 13px;
    color: #6B6860;
    letter-spacing: 0.03em;
    font-weight: 400;
}

.sf-metric-value {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: #1A2332;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Main Content Area */
.sf-main {
    background: white;
    border: 1px solid var(--champagne);
    overflow: hidden;
}

/* Senna Introduction */
.sf-senna-section {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--champagne);
}

.sf-senna-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.sf-senna-avatar-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--champagne);
}

.sf-senna-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-senna-identity h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 300;
    color: var(--charcoal);
}

.sf-senna-identity p {
    font-size: 13px;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.sf-senna-message {
    font-size: 16px;
    line-height: 1.8;
    color: var(--graphite);
    margin-bottom: var(--space-lg);
}

.sf-senna-message p {
    margin-bottom: var(--space-md);
}

/* Opportunities Section */
.sf-opportunities {
    padding: var(--space-xl);
}

.sf-opportunities-header {
    margin-bottom: var(--space-lg);
}

.sf-opportunities-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: var(--space-sm);
}

.sf-opportunities-subtitle {
    font-size: 14px;
    color: var(--stone);
    letter-spacing: 0.05em;
}

/* Opportunities Grid - 2x3 */
.sf-opportunities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.sf-opportunity-card {
    border: 1px solid var(--champagne);
    padding: var(--space-lg);
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

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

.sf-match-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 4px 12px;
    background: var(--charcoal);
    color: white;
    font-size: 12px;
    letter-spacing: 0.05em;
    font-weight: 400;
}

.sf-source-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--champagne);
    color: var(--stone);
    font-size: 11px;
    letter-spacing: 0.03em;
    font-weight: 400;
}

.sf-company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.sf-company-info {
    flex: 1;
}

.sf-position-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.sf-company-name {
    font-size: 14px;
    color: var(--stone);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.sf-job-details {
    display: flex;
    gap: var(--space-md);
    font-size: 13px;
    color: var(--stone);
    margin-bottom: var(--space-md);
}

.sf-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-detail-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.sf-job-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--graphite);
    margin-bottom: var(--space-md);
}

.sf-optimize-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: white;
    border: 1px solid var(--charcoal);
    color: var(--charcoal);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sf-optimize-btn:hover {
    background: var(--charcoal);
    color: white;
}

/* Show More */
.sf-show-more-section {
    text-align: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--champagne);
}

.sf-show-more-btn {
    padding: var(--space-sm) var(--space-lg);
    background: white;
    border: 1px solid var(--charcoal);
    color: var(--charcoal);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sf-show-more-btn:hover {
    background: var(--charcoal);
    color: white;
}

/* Query Section - Redesigned */
.sf-query-section {
    padding: 48px;
    background: linear-gradient(135deg, #F8F6F3 0%, #FFFFFF 100%);
    border: 1px solid #E8E6E1;
    margin-top: 32px;
}

.sf-query-label {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 300;
    color: #1A2332;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.01em;
}

.sf-query-container {
    display: flex;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    align-items: stretch;
}

.sf-query-textarea {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #D4D2CD;
    background: white;
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 14px;
    resize: none;
    min-height: 56px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.sf-query-textarea:focus {
    outline: none;
    border-color: #1A2332;
    box-shadow: 0 0 0 1px #1A2332;
    min-height: 80px;
}

.sf-query-submit {
    padding: 16px 32px;
    background: #1A2332;
    color: white;
    border: none;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    height: 56px;
}

.sf-query-submit:hover {
    background: #0A1322;
    transform: translateY(-1px);
}

/* Full-Screen Modal */
.sf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ivory);
    z-index: 100000;
    overflow-y: auto;
}

.sf-modal.active {
    display: block;
}

.sf-modal-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--champagne);
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sf-modal-identity {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sf-modal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--champagne);
}

.sf-modal-title h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 300;
    color: var(--charcoal);
}

.sf-modal-title p {
    font-size: 13px;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.sf-modal-close {
    width: 48px;
    height: 48px;
    border: 1px solid var(--charcoal);
    background: white;
    color: var(--charcoal);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-modal-close:hover {
    background: var(--charcoal);
    color: white;
}

.sf-modal-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.sf-modal-messages {
    min-height: 400px;
    margin-bottom: var(--space-xl);
}

.sf-modal-message {
    margin-bottom: var(--space-lg);
    animation: fadeIn 0.5s ease;
}

.sf-modal-message.user {
    text-align: right;
}

.sf-modal-message-content {
    display: inline-block;
    max-width: 70%;
    padding: var(--space-md) var(--space-lg);
    background: white;
    border: 1px solid var(--champagne);
}

.sf-modal-message.user .sf-modal-message-content {
    background: var(--charcoal);
    color: white;
    border-color: var(--charcoal);
}

/* Visual Cards */
.sf-visual-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.sf-visual-card {
    padding: var(--space-lg);
    background: white;
    border: 1px solid var(--champagne);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.sf-visual-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pearl);
    border-radius: 50%;
    font-size: 24px;
}

.sf-visual-card-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.sf-visual-card-desc {
    font-size: 13px;
    color: var(--stone);
}

/* Analysis Display */
.sf-analysis-section {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background: white;
    border: 1px solid var(--champagne);
}

.sf-analysis-header {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 300;
    color: var(--charcoal);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--champagne);
}

.sf-score-display {
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--bronze), var(--copper));
    color: white;
    margin: var(--space-lg) 0;
}

.sf-score-number {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
}

.sf-score-label {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: var(--space-sm);
}

.sf-analysis-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--graphite);
}

.sf-analysis-list {
    list-style: none;
    margin: var(--space-md) 0;
}

.sf-analysis-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--silk);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.sf-list-marker {
    width: 20px;
    height: 20px;
    background: var(--charcoal);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Modal Input */
.sf-modal-input-section {
    padding: var(--space-lg);
    background: white;
    border: 1px solid var(--champagne);
    position: sticky;
    bottom: 0;
}

.sf-modal-input-container {
    display: flex;
    gap: var(--space-md);
}

.sf-modal-textarea {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--champagne);
    font-family: var(--font-body);
    font-size: 15px;
    resize: none;
    min-height: 80px;
}

.sf-modal-send {
    padding: var(--space-md) var(--space-lg);
    background: var(--charcoal);
    color: white;
    border: none;
    font-size: 14px;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sf-modal-send:hover {
    background: var(--graphite);
}

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

/* Mobile Optimization */
@media (max-width: 1200px) {
    .sf-layout {
        grid-template-columns: 1fr;
    }
    
    .sf-journey-sidebar {
        position: static;
        margin-bottom: 32px;
    }
}

@media (max-width: 768px) {
    /* Header */
    .sf-header {
        padding: 24px 20px;
    }
    
    .sf-brand-name {
        font-size: 32px;
    }
    
    .sf-brand-tagline {
        display: none;
    }
    
    /* Container */
    .sf-container {
        padding: 20px;
    }
    
    /* Opportunities Grid */
    .sf-opportunities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sf-opportunity-card {
        padding: 24px;
    }
    
    /* Query Section */
    .sf-query-section {
        padding: 32px 20px;
    }
    
    .sf-query-container {
        flex-direction: column;
    }
    
    .sf-query-textarea {
        min-height: 80px;
    }
    
    .sf-query-submit {
        width: 100%;
        padding: 16px;
    }
    
    /* Metrics */
    .sf-metric-item {
        padding: 16px 20px;
    }
    
    /* Journey Card */
    .sf-step {
        padding: 16px 20px;
    }
    
    /* Senna Section */
    .sf-senna-section {
        padding: 32px 20px;
    }
    
    /* Opportunities Section */
    .sf-opportunities {
        padding: 32px 20px;
    }
    
    .sf-opportunities-title {
        font-size: 24px;
    }
    
    /* Visual Cards in Modal */
    .sf-visual-cards {
        grid-template-columns: 1fr;
    }
    
    /* Typography adjustments */
    .sf-position-title {
        font-size: 18px;
    }
    
    .sf-journey-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    /* Even more compact for very small screens */
    .sf-header-content {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .sf-user-section {
        width: 100%;
        justify-content: space-between;
    }
    
    .sf-brand-name {
        font-size: 28px;
    }
    
    .sf-show-more-btn {
        width: 100%;
    }
}