/* ========================================
   Lukasz Kobylski - Personal Portfolio
   Fancy Design with Glassmorphism & Animations
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #0a0a1a;
    --color-card: rgba(255, 255, 255, 0.05);
    --color-card-border: rgba(255, 255, 255, 0.1);
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-heading: #ffffff;
    --color-accent-1: #818cf8;
    --color-accent-2: #06b6d4;
    --color-accent-3: #a78bfa;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

strong {
    color: var(--color-heading);
    font-weight: 600;
}

/* --- Animated Background Blobs --- */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4f46e5, transparent 70%);
    top: -10%;
    left: -5%;
    animation-duration: 22s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #0891b2, transparent 70%);
    top: 50%;
    right: -10%;
    animation-duration: 18s;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-duration: 25s;
    animation-delay: -10s;
}

.blob-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 20%;
    left: 60%;
    animation-duration: 20s;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -40px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(15px, 30px) scale(1.02);
    }
}

/* --- Main Container --- */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
}

/* --- Glassmorphism Card --- */
.card {
    background: var(--color-card);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--color-card-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 8px 40px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(99, 102, 241, 0.06);
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Profile Section --- */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--color-accent-1),
        var(--color-accent-2),
        var(--color-accent-3),
        var(--color-accent-1)
    );
    animation: spin 4s linear infinite;
    opacity: 0.8;
}

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

.avatar {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-bg);
    z-index: 1;
}

.name-block {
    animation: fadeSlideUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

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

.name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.role {
    margin-top: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent-2);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* --- Divider --- */
.divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-card-border),
        rgba(129, 140, 248, 0.3),
        var(--color-card-border),
        transparent
    );
    margin: 1.75rem 0;
}

/* --- About Section --- */
.about-section p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.about-section p + p {
    margin-top: 0.75rem;
}

/* --- Skills Section --- */
.skills-section {
    margin-top: 1.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-mono);
    color: var(--color-accent-1);
    background: rgba(129, 140, 248, 0.08);
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.1);
}

/* --- Quote --- */
.quote {
    margin-top: 1.5rem;
    text-align: center;
    position: relative;
    padding: 1.25rem 1.5rem;
}

.quote::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.08);
}

.quote p {
    position: relative;
    font-style: italic;
    color: var(--color-text);
    font-size: 0.95rem;
    opacity: 0.85;
}

/* --- Contact Section --- */
.contact-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    color: var(--color-text-muted);
}

.contact-link i {
    font-size: 1.4rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-link span {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-link:hover {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.2);
    color: var(--color-accent-1);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(129, 140, 248, 0.1);
}

.contact-link:hover i {
    transform: scale(1.15);
}

/* --- Fade-in Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: var(--delay, 0s);
}

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

/* --- Responsive --- */
@media (min-width: 640px) {
    .card {
        padding: 3rem 2.5rem;
    }

    .profile-section {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }

    .skills-grid {
        justify-content: flex-start;
    }

    .name {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 2rem 1.25rem;
    }

    .name {
        font-size: 1.65rem;
    }

    .contact-section {
        flex-wrap: wrap;
    }

    .blob {
        filter: blur(60px);
        opacity: 0.3;
    }

    .blob-1 { width: 300px; height: 300px; }
    .blob-2 { width: 250px; height: 250px; }
    .blob-3 { width: 200px; height: 200px; }
    .blob-4 { width: 180px; height: 180px; }
}

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