:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #3b82f6;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', sans-serif;
    --sidebar-width: 350px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--card-border);
    background: rgba(5, 5, 5, 0.6);
    /* More transparent for depth */
    backdrop-filter: blur(20px);
    z-index: 100;
}

.profile-container {
    text-align: center;
    /* Centered for magazine look */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.profile-image-wrapper {
    width: 280px;
    /* Much larger */
    height: 350px;
    /* Portrait aspect ratio */
    margin-bottom: -40px;
    /* Overlap effect */
    position: relative;
    z-index: 1;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    /* Smooth rounded corners */
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.4);
    /* Strong glow */
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.profile-name {
    font-size: 3.5rem;
    /* Huge typography */
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    /* Sits on top of image bottom */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 1);
    /* Stronger shadow for contrast */
    color: #ffffff;
    /* Fallback */
    background: linear-gradient(to bottom, #ffffff 20%, #94a3b8 100%);
    /* Brighter gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}

.profile-title {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 16px;
    opacity: 0.9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    /* Center nav items */
    margin-top: 60px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.sidebar-footer {
    margin-top: auto;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 80px 60px;
    max-width: 1000px;
}

.section-container {
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-container:nth-child(1) {
    animation-delay: 0.1s;
}

.section-container:nth-child(2) {
    animation-delay: 0.3s;
}

.section-container:nth-child(3) {
    animation-delay: 0.5s;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* About Section */
.about-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.bio-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

.card-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    padding-bottom: 40px;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 4px;
    transition: opacity 0.2s;
}

.email-link:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 40px 24px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        align-items: center;
        text-align: center;
    }

    .profile-container {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
        margin: 32px 0;
    }

    .nav-link:hover,
    .nav-link.active {
        transform: translateY(-2px);
    }

    .main-content {
        margin-left: 0;
        padding: 40px 24px;
    }

    .section-container {
        margin-bottom: 80px;
    }
}