:root {
    /* Light mode colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: white;
    --bg-tertiary: #e3f2fd;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;
    --accent-primary: #2c3e50;
    --accent-secondary: #3498db;
    --accent-light: #5dade2;
    --border-color: rgba(52, 152, 219, 0.2);
    --shadow: rgba(44, 62, 80, 0.1);
    --shadow-hover: rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888;
    --accent-primary: #4a90e2;
    --accent-secondary: #5dade2;
    --accent-light: #74b9ff;
    --border-color: rgba(255,255,255,0.1);
    --shadow: rgba(0,0,0,0.3);
    --shadow-hover: rgba(93, 173, 226, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.container {
    max-width: 500px;
    width: 90%;
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 
        0 8px 32px var(--shadow),
        0 2px 10px var(--shadow-hover);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    animation: slideInUp 0.8s ease-out;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.profile-section {
    margin-bottom: 2rem;
}

.name {
    color: var(--accent-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInDown 1s ease-out 0.2s both;
    transition: color 0.3s ease;
}

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

.title {
    color: var(--accent-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
    transition: color 0.3s ease;
}

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

.social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 80px);
    gap: 1rem;
    animation: fadeIn 1.2s ease-out 0.6s both;
    margin-bottom: 2rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.link-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-direction: row;
}

.link-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

/* Bento grid specific positioning */
.social-link:nth-child(1) { /* GitHub */
    grid-column: 1 / 3;
    grid-row: 1;
}

.social-link:nth-child(2) { /* Email */
    grid-column: 3;
    grid-row: 1;
}

.social-link:nth-child(3) { /* CV */
    grid-column: 1 / 4;
    grid-row: 2;
}

/* Organization section styles */
.organization-section {
    margin-top: 1rem;
    animation: fadeIn 1.4s ease-out 0.8s both;
}

.organization-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}

.organization-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-secondary);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 16px;
    z-index: -1;
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover {
    color: white;
    border-color: var(--accent-secondary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 35px var(--shadow-hover),
        0 5px 25px var(--shadow-hover);
}

.social-link:hover .link-text {
    color: white;
}

/* Social platform specific styles */
.social-link.github:hover::before {
    background: #333;
}

.social-link.email:hover::before {
    background: #ea4335;
}

.social-link.youtube:hover::before {
    background: #ff0000;
}

.social-link.huggingface:hover::before {
    background: #ff9d00;
}

.social-link.cv:hover::before {
    background: #8e44ad;
}

.social-link img {
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease;
}

.social-link:hover img {
    filter: brightness(0) invert(1);
}

.social-icon {
    width: 24px;
    height: 24px;
    font-size: 24px;
    transition: all 0.3s ease;
    color: var(--accent-primary);
}

.social-link:hover .social-icon {
    color: white;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .container {
        padding: 2rem 1.5rem;
        margin: 1rem;
        width: 95%;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .social-links {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 70px);
        gap: 0.8rem;
    }

    .social-link:nth-child(1) { /* GitHub */
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .social-link:nth-child(2) { /* Email */
        grid-column: 1;
        grid-row: 2;
    }

    .social-link:nth-child(3) { /* CV */
        grid-column: 2;
        grid-row: 2;
    }

    .organization-title {
        font-size: 1.3rem;
    }

    .organization-links {
        gap: 0.8rem;
    }

    .social-link {
        font-size: 1.2rem;
        padding: 0.8rem;
    }

    .link-text {
        font-size: 0.8rem;
    }

    .social-icon {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .name {
        font-size: 1.8rem;
    }

    .social-links {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 60px);
        gap: 0.6rem;
    }

    .social-link:nth-child(1) { /* GitHub */
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .social-link:nth-child(2) { /* Email */
        grid-column: 1;
        grid-row: 2;
    }

    .social-link:nth-child(3) { /* CV */
        grid-column: 2;
        grid-row: 2;
    }

    .organization-title {
        font-size: 1.1rem;
    }

    .organization-links {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .social-link {
        font-size: 1rem;
        padding: 0.6rem;
    }

    .link-content {
        gap: 0.5rem;
    }

    .link-text {
        font-size: 0.7rem;
    }

    .social-link img {
        width: 20px;
        height: 20px;
    }

    .social-icon {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
}

/* Subtle accent border */
.container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-light));
    border-radius: 20px 20px 0 0;
}

/* Dark mode improvements */
[data-theme="dark"] .social-link {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .social-link:hover {
    box-shadow: 
        0 15px 35px var(--shadow),
        0 5px 25px var(--shadow-hover);
} 