* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
}

body.inverted {
    background: #1a1a1a;
    color: #f5f5f5;
}

/* Profile Picture */
.profile-picture {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e0e0e0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-picture:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

body.inverted .profile-picture {
    border-color: #555;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

/* Modal for Profile Picture */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
    user-select: none;
}

.close:hover {
    transform: scale(1.2) rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Theme Toggle Switch */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
}

.toggle-switch {
    position: relative;
    width: 51px;
    height: 31px;
    background: #e0e0e0;
    border-radius: 31px;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.inverted .toggle-switch {
    background: #e0e0e0;
}

body.inverted .toggle-switch::after {
    transform: translateX(20px);
}

/* Animated Background Particles */
.particle {
    position: absolute;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.5s ease;
}

body.inverted .particle {
    background: rgba(255, 255, 255, 0.03);
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 15%;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 70%;
    left: 80%;
    animation: float 15s infinite ease-in-out 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 5%;
    animation: float 25s infinite ease-in-out 5s;
}

.particle:nth-child(4) {
    width: 70px;
    height: 70px;
    top: 20%;
    left: 85%;
    animation: float 18s infinite ease-in-out 3s;
}

.particle:nth-child(5) {
    width: 90px;
    height: 90px;
    top: 80%;
    left: 20%;
    animation: float 22s infinite ease-in-out 7s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 40px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(40px, 20px) scale(1.05);
        opacity: 0.6;
    }
}

/* Container */
.container {
    text-align: center;
    z-index: 10;
    position: relative;
}

/* Name Heading */
h1 {
    font-size: 5rem;
    font-weight: 300;
    color: #1a1a1a;
    letter-spacing: 0.5rem;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    transition: all 0.5s ease;
}

body.inverted h1 {
    color: #f5f5f5;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #1a1a1a;
    animation: lineGrow 1.5s ease-out 0.5s forwards;
    transition: all 0.5s ease;
}

body.inverted h1::after {
    background: #f5f5f5;
}

@keyframes lineGrow {
    to {
        width: 100%;
    }
}

h1 span {
    display: inline-block;
    opacity: 0;
    animation: letterFadeIn 0.5s ease-out forwards;
}

h1 span:nth-child(1) { animation-delay: 0.1s; }
h1 span:nth-child(2) { animation-delay: 0.2s; }
h1 span:nth-child(3) { animation-delay: 0.3s; }
h1 span:nth-child(4) { animation-delay: 0.4s; }
h1 span:nth-child(5) { animation-delay: 0.5s; }
h1 span:nth-child(6) { animation-delay: 0.6s; }
h1 span:nth-child(7) { animation-delay: 0.7s; }
h1 span:nth-child(8) { animation-delay: 0.8s; }
h1 span:nth-child(9) { animation-delay: 0.9s; }

@keyframes letterFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 35px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.social-links a:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

body.inverted .social-links a:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.social-links svg {
    width: 26px;
    height: 26px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Social Media Brand Colors */
.social-links a:nth-child(1) {
    background: #0A66C2;
    border-color: #0A66C2;
}

.social-links a:nth-child(1) svg {
    fill: #fff;
}

.social-links a:nth-child(1):hover {
    background: #004182;
    border-color: #004182;
}

.social-links a:nth-child(2) {
    background: #181717;
    border-color: #181717;
}

.social-links a:nth-child(2) svg {
    fill: #fff;
}

.social-links a:nth-child(2):hover {
    background: #000;
    border-color: #000;
}

.social-links a:nth-child(3) {
    background: #1877F2;
    border-color: #1877F2;
}

.social-links a:nth-child(3) svg {
    fill: #fff;
}

.social-links a:nth-child(3):hover {
    background: #0c63d4;
    border-color: #0c63d4;
}

.social-links a:nth-child(4) {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF);
    border-color: #DD2A7B;
}

.social-links a:nth-child(4) svg {
    fill: #fff;
}

.social-links a:nth-child(4):hover {
    background: linear-gradient(45deg, #E7771F, #C91F6B, #6F289F);
    border-color: #C91F6B;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-picture {
        width: 120px;
        height: 120px;
        top: -150px;
    }

    .theme-toggle {
        right: 25px;
        top: 25px;
    }

    h1 {
        font-size: 3rem;
        letter-spacing: 0.3rem;
        margin-bottom: 50px;
    }

    .social-links {
        gap: 25px;
    }

    .social-links a {
        width: 55px;
        height: 55px;
    }

    .social-links svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .profile-picture {
        width: 100px;
        height: 100px;
        top: -130px;
    }

    .theme-toggle {
        right: 20px;
        top: 20px;
    }

    .toggle-switch {
        width: 46px;
        height: 28px;
    }

    .toggle-switch::after {
        width: 24px;
        height: 24px;
    }

    body.inverted .toggle-switch::after {
        transform: translateX(18px);
    }

    h1 {
        font-size: 2rem;
        letter-spacing: 0.2rem;
    }

    .social-links a {
        width: 50px;
        height: 50px;
    }

    .social-links svg {
        width: 22px;
        height: 22px;
    }
}
