@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;600;700&display=swap');

:root {
    --bg-deep: #0a0e14;
    --bg-gradient: linear-gradient(160deg, #0a0e14 0%, #0f1820 35%, #132029 70%, #0d161c 100%);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f4f8;
    --text-secondary: #8b9cad;
    --text-muted: #5c6f82;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --hover-bg: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    --card-radius: 14px;
}

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

html, body {
    height: 100%;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-deep);
    background-image:
        var(--bg-gradient),
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(circle at 80% 80%, rgba(30, 64, 175, 0.06), transparent);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 1rem;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 24px var(--accent-glow);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.bio {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

/* Links Section */
.links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--card-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.link-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-color);
    border-radius: 3px 0 0 3px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-icon {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.link-card:hover {
    transform: translateY(-2px);
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.link-card .link-text {
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.35;
}

.link-card i { /* Arrow icon */
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.link-card:hover i {
    opacity: 1;
    transform: translateX(3px) rotate(-15deg); /* Dynamic subtle movement */
}

/* Social Icons */
.socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-bottom: 2rem;
}

.socials a {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
    opacity: 0.8;
}

.socials a:hover {
    transform: scale(1.2);
    color: #fff;
    opacity: 1;
}

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

.section-title {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    align-self: flex-start;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.75rem;
    opacity: 0.95;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    align-self: flex-start;
    padding-left: 0.75rem;
}

/* Lightbox – centrato a schermo intero, non di lato */
.lightbox {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    padding: 2rem;
    box-sizing: border-box;
    animation: lightboxFadeIn 0.2s ease;
}

.lightbox.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(90vw, 900px);
    max-height: min(85vh, 85vh);
    margin: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.25s ease;
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
}

.lightbox-close {
    position: absolute;
    top: -2.75rem;
    right: 50%;
    transform: translateX(50%);
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lightboxZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }

    .link-card {
        padding: 1rem 1.25rem;
    }

    .section-desc {
        font-size: 0.9rem;
    }
}