/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rainbow-1: #c084fc;
    --rainbow-2: #a78bfa;
    --rainbow-3: #8b5cf6;
    --rainbow-4: #7c3aed;
    --rainbow-5: #6366f1;
    --rainbow-6: #818cf8;
    --rainbow-7: #a5b4fc;
    --rainbow-8: #c7d2fe;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;

    --linkedin-color: #0077b5;
    --upwork-color: #14a800;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg,
        var(--rainbow-4) 0%,
        var(--rainbow-3) 20%,
        var(--rainbow-2) 40%,
        var(--rainbow-5) 60%,
        var(--rainbow-6) 80%,
        var(--rainbow-1) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 1rem;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg,
        #5b21b6 0%,
        #6d28d9 50%,
        #4c1d95 100%);
    color: white;
    padding: 4rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(92, 33, 182, 0.3);
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.profile-section {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.6s ease-out 0.2s both;
}

.title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.98;
    font-weight: 400;
    animation: slideDown 0.6s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

/* Main Content */
.main-content {
    padding: 2rem;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 700px;
    margin: 0 auto;
}

/* Circular Stats Section */
.stats-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.stat-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    transition: var(--transition);
    cursor: default;
    box-shadow: var(--shadow-lg);
}

.stat-circle::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.stat-circle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-2xl);
}

.stat-circle:hover::before {
    opacity: 1;
}

.stat-circle-1 {
    background: linear-gradient(135deg, var(--rainbow-1), var(--rainbow-2));
    animation: popIn 0.6s ease-out 0.7s both;
}

.stat-circle-2 {
    background: linear-gradient(135deg, var(--rainbow-5), var(--rainbow-6));
    animation: popIn 0.6s ease-out 0.85s both;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    60% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Expertise Section */
.expertise-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out 1.1s both;
}

.expertise-section h2 {
    font-size: 1.875rem;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.expertise-category {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.expertise-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rainbow-1), var(--rainbow-8));
    opacity: 0;
    transition: var(--transition);
}

.expertise-category:nth-child(1)::before {
    background: linear-gradient(90deg, var(--rainbow-1), var(--rainbow-2));
}

.expertise-category:nth-child(2)::before {
    background: linear-gradient(90deg, var(--rainbow-4), var(--rainbow-5));
}

.expertise-category:nth-child(3)::before {
    background: linear-gradient(90deg, var(--rainbow-6), var(--rainbow-7));
}

.expertise-category:nth-child(4)::before {
    background: linear-gradient(90deg, var(--rainbow-8), var(--rainbow-1));
}

.expertise-category:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.expertise-category:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1;
}

.expertise-category h3 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-weight: 700;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.expertise-category ul {
    list-style: none;
}

.expertise-category li {
    padding: 0.625rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.expertise-category li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-primary);
    font-weight: bold;
    transition: var(--transition-fast);
}

.expertise-category:hover li::before {
    transform: translateX(4px);
}

/* Links Section */
.links-section {
    animation: fadeIn 0.8s ease-out 1.2s both;
    margin-bottom: 2rem;
}

.links-section h2 {
    font-size: 1.875rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1.75rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.05) 0%,
        rgba(192, 132, 252, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--rainbow-6);
}

.link-card.linkedin:hover {
    border-color: var(--linkedin-color);
}

.link-card.linkedin:hover .icon {
    color: var(--linkedin-color);
    transform: scale(1.15) rotate(-5deg);
}

.link-card.upwork:hover {
    border-color: var(--upwork-color);
}

.link-card.upwork:hover .icon {
    color: var(--upwork-color);
    transform: scale(1.15) rotate(5deg);
}

.icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-right: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.link-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.link-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.link-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (min-width: 640px) {
    body {
        padding: 2rem;
    }

    .main-content {
        padding: 3rem;
    }

    .stats-section {
        gap: 2.5rem;
    }

    .stat-circle {
        width: 160px;
        height: 160px;
    }

    .stat-number {
        font-size: 2.75rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 5rem 3rem 6rem;
    }

    .name {
        font-size: 3.75rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 4rem;
    }

    .intro {
        margin-bottom: 4rem;
    }

    .description {
        font-size: 1.25rem;
    }

    .stats-section {
        gap: 3rem;
        margin-bottom: 5rem;
    }

    .stat-circle {
        width: 180px;
        height: 180px;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .expertise-section {
        margin-bottom: 5rem;
    }

    .expertise-section h2,
    .links-section h2 {
        font-size: 2.25rem;
        margin-bottom: 3rem;
    }

    .expertise-grid {
        gap: 2rem;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 100%;
    }

    .link-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        border-radius: 2.5rem;
    }

    .header {
        padding: 6rem 4rem 7rem;
    }

    .name {
        font-size: 4.5rem;
    }

    .main-content {
        padding: 5rem;
    }

    .stats-section {
        gap: 4rem;
        margin-bottom: 6rem;
    }

    .stat-circle {
        width: 200px;
        height: 200px;
    }

    .stat-number {
        font-size: 3.5rem;
    }

    .expertise-section {
        margin-bottom: 6rem;
    }

    .expertise-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .links-grid {
        gap: 2rem;
    }
}

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

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .header {
        background: none;
        color: var(--text-primary);
        padding: 2rem 0;
    }

    .stat-circle {
        box-shadow: none;
        border: 2px solid var(--border-color);
        color: var(--text-primary);
    }

    .expertise-category,
    .link-card {
        page-break-inside: avoid;
    }
}
