/* ===================================
   Table Tennis Project Specific Styles
   Apple Design System
   =================================== */

/* Design Tokens - Apple Style */
:root {
    /* Spacing Scale - Generous Apple-style spacing */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-2xl: 4rem;     /* 64px */
    --space-3xl: 5rem;     /* 80px */
    --space-4xl: 6rem;     /* 96px */
    --space-5xl: 8rem;     /* 128px */
    --space-6xl: 10rem;    /* 160px */

    /* Typography Scale - Clear hierarchy */
    --font-size-xs: 0.875rem;    /* 14px */
    --font-size-sm: 1rem;        /* 16px */
    --font-size-base: 1.125rem;  /* 18px - Apple body text */
    --font-size-lg: 1.25rem;     /* 20px */
    --font-size-xl: 1.5rem;      /* 24px */
    --font-size-2xl: 1.875rem;   /* 30px */
    --font-size-3xl: 2.5rem;     /* 40px */
    --font-size-4xl: 3.5rem;     /* 56px */
    --font-size-5xl: 4.5rem;     /* 72px */
    --font-size-6xl: 6rem;       /* 96px */

    /* Font Weights - Apple uses clear weight distinctions */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 800;

    /* Line Heights - Optimized for readability */
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;
    --line-height-loose: 2;

    /* Colors - Refined Apple-style palette */
    --color-text-primary: #1d1d1f;      /* Apple's near-black */
    --color-text-secondary: #6e6e73;    /* Apple's gray */
    --color-text-tertiary: #86868b;     /* Apple's light gray */
    --color-bg-white: #ffffff;
    --color-bg-light: #fafafa;
    --color-bg-lighter: #f5f5f7;        /* Apple's lightest gray */
    --color-brand: #4DD0E1;             /* Your brand cyan */
    --color-brand-light: rgba(77, 208, 225, 0.1);
    --color-brand-dark: #2ab7ca;

    /* Shadows - Subtle Apple-style shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.1);

    /* Border Radius - Apple's subtle curves */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    /* Transitions - Apple's smooth animations */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
}

/* Research Visualizations */
.research-visualizations {
    margin: 5rem 0;
}

.viz-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

.viz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.viz-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.viz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.viz-image-wrapper {
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.viz-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.viz-card:hover .viz-image-wrapper img {
    transform: scale(1.05);
}

.viz-caption {
    padding: 2rem;
}

.viz-caption h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4DD0E1;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.viz-caption p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #6e6e73;
    margin: 0;
}

/* Personas Grid Container */
.personas-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2rem;
}

.persona-card {
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.12);
    border: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.persona-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 110px rgba(102, 126, 234, 0.2);
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    padding: 4rem 4rem 3rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.persona-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.persona-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.persona-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.persona-card:hover .persona-photo {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.persona-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.persona-info {
    position: relative;
    z-index: 1;
    flex: 1;
}

.persona-name {
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 0.8rem 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.persona-age {
    font-size: 1.3rem;
    margin: 0 0 1.2rem 0;
    opacity: 0.95;
    font-weight: 300;
}

.persona-level {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    display: inline-block;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.persona-level:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.persona-body {
    padding: 3.5rem 4rem 4rem;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.persona-section {
    margin-bottom: 3.5rem;
}

.persona-section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 2rem 0;
    position: relative;
    padding-bottom: 0.8rem;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

.skill-radar {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.skill-radar:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}

.persona-details {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3.5rem;
    border: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.detail-value {
    font-size: 1.15rem;
    color: #374151;
    font-weight: 500;
}

.persona-quotes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.persona-quotes li {
    font-size: 1.15rem;
    line-height: 1.9;
    padding: 1.5rem 1.8rem 1.5rem 3rem;
    position: relative;
    color: #374151;
    border-left: 4px solid #6366f1;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.persona-quotes li:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-left-color: #8b5cf6;
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.persona-quotes li::before {
    content: '"';
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 2.5rem;
    color: #6366f1;
    font-weight: 900;
    opacity: 0.15;
    line-height: 1;
}

.highlight-red {
    color: #dc2626;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.12);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.highlight-red:hover {
    background: rgba(220, 38, 38, 0.18);
}

.highlight-cyan {
    color: #06b6d4;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.12);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.highlight-cyan:hover {
    background: rgba(6, 182, 212, 0.18);
}

.persona-frustrations {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 2.5rem;
    border-radius: 20px;
    border-left: 6px solid #dc2626;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.08);
    transition: all 0.3s ease;
}

.persona-frustrations:hover {
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.12);
    transform: translateY(-4px);
}

.persona-frustrations h4 {
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 1.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.persona-frustrations h4::before {
    content: '⚠';
    font-size: 1.6rem;
}

.persona-frustrations p {
    color: #374151;
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 0;
    font-weight: 500;
}

/* Research Findings */
.research-findings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin: 4rem 0;
}

.finding-item {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.finding-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.finding-stat {
    font-size: 4rem;
    font-weight: 700;
    color: #4DD0E1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.finding-item p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #6e6e73;
}

/* Case Study Section */
.case-study-section-wrapper {
    margin: 6rem 0;
}

.case-study-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

.case-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 4rem;
    margin-top: 3rem;
}

.case-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.case-image {
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.case-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

.case-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    padding: 2.5rem 2.5rem 1.5rem;
    line-height: 1.3;
}

.case-function {
    padding: 0 2.5rem 2rem;
}

.case-function h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #4DD0E1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem 0;
}

.case-function p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #6e6e73;
    margin: 0;
}

.case-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 2px solid #f3f4f6;
}

.pros,
.cons {
    padding: 2rem;
    position: relative;
}

.pros {
    border-right: 2px solid #f3f4f6;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.01) 100%);
}

.cons {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03) 0%, rgba(239, 68, 68, 0.01) 100%);
}

.icon-check,
.icon-cross {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.icon-check {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.icon-cross {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.case-pros-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-pros-cons li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.pros li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 900;
}

.cons li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 900;
}

/* Exploration Grid */
.exploration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin: 5rem 0;
}

.exploration-item {
    padding: 3rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.exploration-item:hover {
    transform: translateY(-4px);
    border-color: rgba(77, 208, 225, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.exploration-item h4 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.exploration-item p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #6e6e73;
}

/* Responsive adjustments for persona */
@media (max-width: 1024px) {
    .persona-header {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        padding: 3rem 2.5rem;
    }

    .persona-photo {
        width: 180px;
        height: 180px;
    }

    .persona-name {
        font-size: 2.5rem;
    }

    .persona-body {
        padding: 3rem 2.5rem;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .detail-label {
        font-weight: 800;
        color: #6366f1;
    }

    .persona-quotes li {
        transform: none !important;
    }

    .exploration-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .research-findings {
        grid-template-columns: repeat(2, 1fr);
    }

    .viz-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-study-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .persona-card {
        border-radius: 24px;
    }

    .persona-header {
        padding: 2.5rem 2rem;
    }

    .persona-photo {
        width: 160px;
        height: 160px;
        border-width: 5px;
    }

    .persona-name {
        font-size: 2.2rem;
    }

    .persona-age {
        font-size: 1.15rem;
    }

    .persona-level {
        font-size: 1.1rem;
        padding: 0.7rem 1.5rem;
    }

    .persona-body {
        padding: 2.5rem 2rem;
    }

    .section-label {
        font-size: 1.4rem;
    }

    .skill-radar,
    .persona-details {
        padding: 2rem;
    }

    .detail-row {
        padding: 1.2rem 0;
    }

    .detail-label {
        font-size: 0.85rem;
    }

    .detail-value {
        font-size: 1.05rem;
    }

    .persona-quotes li {
        font-size: 1.05rem;
        padding: 1.3rem 1.5rem 1.3rem 2.8rem;
    }

    .persona-quotes li::before {
        font-size: 2rem;
    }

    .persona-frustrations {
        padding: 2rem;
    }

    .persona-frustrations h4 {
        font-size: 1.3rem;
    }

    .persona-frustrations p {
        font-size: 1.05rem;
    }

    .exploration-grid {
        grid-template-columns: 1fr;
    }

    .research-findings {
        grid-template-columns: 1fr;
    }

    .viz-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .case-study-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .case-title {
        font-size: 1.3rem;
        padding: 1.5rem 1.5rem 1rem;
    }

    .case-function {
        padding: 0 1.5rem 1.2rem;
    }

    .case-function h5 {
        font-size: 1rem;
    }

    .case-function p {
        font-size: 0.95rem;
    }

    .case-pros-cons {
        grid-template-columns: 1fr;
    }

    .pros {
        border-right: none;
        border-bottom: 2px solid #f3f4f6;
    }

    .pros,
    .cons {
        padding: 1.5rem;
    }

    .case-pros-cons li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .persona-header {
        padding: 2rem 1.5rem;
    }

    .persona-photo {
        width: 140px;
        height: 140px;
    }

    .persona-name {
        font-size: 1.9rem;
    }

    .persona-body {
        padding: 2rem 1.5rem;
    }

    .section-label {
        font-size: 1.3rem;
    }
}
