:root {
    /* Base Colors - Dark Mode (Default) */
    --bg-main: #050508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --primary: #0047FF;
    --primary-glow: rgba(0, 71, 255, 0.4);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-light: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(10, 10, 15, 0.7);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --container-width: 1200px;
}

[data-theme="light"] {
    --bg-main: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.6);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --primary: #0047FF;
    --primary-glow: rgba(0, 71, 255, 0.2);
    --text-main: #1a1a1f;
    --text-muted: #52525b;
    --border-light: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 30px -10px rgba(100, 100, 111, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* 3D Background Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    /* Optional: Slight gradient overlay to ensure text readability */
    background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 100%);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Floating Navigation */
.floating-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    overflow: visible;
    /* Ensure dropdown is not clipped */
}

.floating-nav:hover {
    width: 92%;
    border-color: var(--primary);
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle svg {
    pointer-events: none;
}

#theme-toggle:hover {
    color: var(--text-main);
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary);
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary.small {
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* Hero Modifications */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    /* Centered narrow focus */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.greeting {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
}

.typing-text {
    color: var(--text-main);
    font-weight: 600;
    border-right: 3px solid var(--primary);
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: transparent;
    color: var(--text-main);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--text-main);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: color 0.3s;
    position: relative;
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.social-links a:hover::after {
    width: 100%;
}

.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 1/1.1;
    background: var(--bg-card);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

@keyframes blink {
    50% {
        border-color: transparent
    }
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-image-wrapper {
        order: 1;
        max-width: 400px;
        margin: 0 auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        /* distinct border to separate from page if color is same */
        border: 1px solid var(--border-light);
        padding: 2rem;
        border-radius: 20px;
        border: 1px solid var(--border-light);
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Sections General */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* About Section */
.about-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--text-main);
}

.about-text em {
    color: var(--primary);
    font-style: normal;
}


/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-dark);
    border: 2px solid var(--primary);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item.right::after {
    left: -8px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--bg-card);
    position: relative;
    border-radius: 15px;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.timeline-content:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.timeline-content .date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: 0.3s;
}

.skill-category:hover {
    border-color: var(--primary);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-tags span {
    background: rgba(0, 71, 255, 0.1);
    color: var(--primary);
    /* Electric Blue Text */
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.skill-tags span:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        text-align: left;
    }


    .timeline-item::after {
        left: 23px;
    }
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 71, 255, 0.15);
}

.project-image {
    height: 250px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.placeholder-bg {
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
}

.project-card:hover .placeholder-bg {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-category {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.contact-item a,
.contact-item p {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.contact-item a:hover {
    color: var(--text-main);
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 71, 255, 0.2);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}