/* Sleek, Modern, Soft-Edged UI */
:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #eff6ff;
    --tertiary: #f1f5f9;
    --border: 1px solid #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --glass-04: rgba(255, 255, 255, 0.4);
    --glass-06: rgba(255, 255, 255, 0.6);
    --glass-08: rgba(255, 255, 255, 0.8);
    --glass-nav: rgba(255, 255, 255, 0.95);
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --primary: #818cf8;
    --primary-hover: #c7d2fe;
    --secondary: #1e293b;
    --tertiary: #334155;
    --border: 1px solid rgba(255, 255, 255, 0.1);
    
    --glass-04: rgba(30, 41, 59, 0.4);
    --glass-06: rgba(30, 41, 59, 0.6);
    --glass-08: rgba(15, 23, 42, 0.8);
    --glass-nav: rgba(15, 23, 42, 0.95);
}

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

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: transparent; /* Changed to transparent so background element shows */
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Live 3D Background Container */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-color); /* Fallback */
    pointer-events: none; /* Let clicks pass through to content */
}

html {
    scroll-behavior: smooth;
    /* Accounts for the sticky navbar height to avoid overlapping content on anchor links */
    scroll-padding-top: 80px;
}

/* Typography Headings */
h1, h2, h3 {
    font-weight: 700;
    color: var(--text-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Base Card Styles */
.card {
    background: var(--bg-color);
    border: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary { 
    background-color: var(--primary); 
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
    transform: translateY(-2px);
}

.btn-secondary { 
    background-color: var(--bg-color); 
    color: var(--text-color);
    border: var(--border);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.btn-outline { 
    background-color: transparent; 
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--secondary);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem max(5%, calc((100vw - 1200px) / 2));
    background-color: var(--glass-08);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

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

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

/* Hamburger for Mobile */
.hamburger {
    display: none;
    cursor: pointer;
}
.hamburger .line {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem max(5%, calc((100vw - 1200px) / 2));
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

/* Added Hero Text Card Container */
.hero-text-card {
    background-color: var(--glass-08);
    backdrop-filter: blur(16px);
    border: var(--border);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: var(--text-color);
}

.highlight {
    color: var(--primary);
    position: relative;
}

.hero h2 {
    font-size: 1.75rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--text-light);
    max-width: 480px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1;
    border-radius: var(--radius-pill);
    background-color: var(--secondary);
    object-fit: cover;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.15);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* About Section */
.about {
    padding: 6rem max(5%, calc((100vw - 1200px) / 2));
    /* Replaced solid white with slightly transparent white to show background */
    background-color: var(--glass-04);
    backdrop-filter: blur(8px);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text h3, .skills h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: var(--tertiary);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}
.tag:hover {
    background: var(--secondary);
    color: var(--primary);
}

/* Projects Section */
.projects {
    padding: 6rem max(5%, calc((100vw - 1200px) / 2));
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Soft transparency for cards so body background slightly bleeds through */
    background-color: var(--glass-06);
    backdrop-filter: blur(10px);
}

.project-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.highlight-pink { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.highlight-yellow { background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%); }
.highlight-green { background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%); }

.project-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    flex: 1;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--tertiary);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
}

/* Contact Section */
.contact {
    padding: 6rem max(5%, calc((100vw - 1200px) / 2));
    /* Replaced solid secondary color with slightly transparent white to match */
    background-color: var(--glass-04);
    backdrop-filter: blur(8px);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--glass-06);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

input, textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: inherit;
    border: var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

input::placeholder, textarea::placeholder {
    color: #94a3b8;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    background-color: var(--bg-color);
    border: var(--border);
    transition: var(--transition);
}

.social-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--glass-nav);
        backdrop-filter: blur(12px);
        border-bottom: var(--border);
        padding: 1.5rem 0;
        text-align: center;
        gap: 1.5rem;
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
        padding-top: 4rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        margin: 0 auto 2rem auto;
    }
    .cta-buttons {
        justify-content: center;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .card {
        padding: 1.5rem;
    }
    .project-card {
        padding: 0;
    }
    .project-info {
        padding: 1.5rem;
    }
    .hero-text-card {
        padding: 1.5rem;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .hero h2 {
        font-size: 1.25rem;
    }
    .hero, .about, .projects, .contact {
        padding: 4rem 5%;
    }
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    .cta-buttons .btn {
        width: 100%;
    }
    .social-links {
        flex-direction: column;
        width: 100%;
    }
    .social-btn,
    #contact-form .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .skill-tags {
        gap: 0.5rem;
    }
    .hero-image img {
        max-width: 240px;
    }
}
