:root {
    --bg-color: #fafafa;
    --text-color: #1a1a1a;
    --secondary-text: #666;
    --accent-color: #000;
    --accent-hover: #333;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);
    --blob-1: #e0e7ff;
    --blob-2: #fae8ff;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
    --bg-color: #0a0a0a;
    --text-color: #f5f5f5;
    --secondary-text: #a0a0a0;
    --accent-color: #ffffff;
    --accent-hover: #dddddd;
    --card-bg: rgba(20, 20, 20, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --blob-1: #1e1b4b;
    --blob-2: #4c1d95;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: var(--blob-1);
    top: -100px;
    left: -100px;
}

.blob-2 {
    background: var(--blob-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(5vw, 5vh) scale(1.1);
    }
}

/* Navigation */
nav {
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 400;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background: var(--card-bg);
}

/* Theme Icon Visibility */
.light-theme .sun-icon {
    display: block;
}

.light-theme .moon-icon {
    display: none;
}

.dark-theme .sun-icon {
    display: none;
}

.dark-theme .moon-icon {
    display: block;
}

/* Default state if no class yet */
body:not(.dark-theme):not(.light-theme) .sun-icon {
    display: block;
}

body:not(.dark-theme):not(.light-theme) .moon-icon {
    display: none;
}

.sun-icon,
.moon-icon {
    width: 18px;
    height: 18px;
}

#hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

#hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Intro & About */
#hero {
    padding: 8rem 0 4rem;
}

#hero h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 600;
    letter-spacing: -3px;
    line-height: 1;
}

#about {
    padding: 4rem 0;
}

.about-text {
    font-size: 1.15rem;
    color: var(--secondary-text);
    max-width: 800px;
    line-height: 1.8;
}

.no-underline {
    text-decoration: none !important;
    color: var(--text-color);
}

/* Sections Base */
section {
    padding: 4rem 0;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
    font-weight: 600;
    letter-spacing: -1px;
}

/* Skills Cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--text-color);
    transform: translateY(-5px);
}

.skill-icon {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    font-size: 0.95rem;
    color: var(--secondary-text);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Projects Improved */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 24px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--text-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.project-card p {
    font-size: 1.05rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 850px;
}

.project-tech {
    font-size: 0.9rem;
    font-family: monospace;
    color: var(--secondary-text);
    opacity: 0.6;
    margin-bottom: 2.5rem;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.status-badge {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--secondary-text);
    opacity: 0.8;
}

/* Contact Horizontal */
.contact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.contact-card {
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--text-color);
    transform: translateY(-5px);
}

.contact-card i {
    width: 24px;
    height: 24px;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

/* Footer Refined */
footer {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.footer-left p {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.footer-right p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--secondary-text);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-delayed {
    transition-delay: 0.2s;
}

/* Mobile */
@media (max-width: 768px) {
    #hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 45%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.1);
        border-left: 1px solid var(--border-color);
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        text-align: center;
        width: 100%;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        align-items: center;
    }

    #hero h1 {
        font-size: 3.5rem;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 70%;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .project-card {
        padding: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}