.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}
.nav-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-right: 2rem;
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Light theme (default) */
:root {
        --primary-color: #6366f1;
        --secondary-color: #8b5cf6;
        --accent-color: #ec4899;
        --text-primary: #1f2937;
        --text-secondary: #6b7280;
        --background: #f8f9fa;
        --surface: rgba(255,255,255,0.7);
        --card: #ffffff;
        --border: #e5e7eb;
        --shadow: rgba(0, 0, 0, 0.1);
        --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
        --transition: background 0.4s, color 0.4s, border 0.4s, box-shadow 0.4s, opacity 0.4s, transform 0.4s;
        --glass-blur: blur(18px);
        --radius: 2rem;
}

/* Explicit dark override via data-theme attribute */
[data-theme="dark"] {
        --background: #0f1113;
        --surface: rgba(23, 25, 28, 0.8);
        --card: #17191c;
        --text-primary: #eef2f7;
        --text-secondary: #a8b0bb;
        --border: #2a2e34;
        --shadow: rgba(0, 0, 0, 0.6);
}

/* Respect system theme when user hasn't chosen */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --background: #0f1113;
        --surface: rgba(23, 25, 28, 0.8);
        --card: #17191c;
        --text-primary: #eef2f7;
        --text-secondary: #a8b0bb;
        --border: #2a2e34;
        --shadow: rgba(0, 0, 0, 0.6);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
        background: var(--surface);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
        box-shadow: var(--shadow);
        border-radius: 0 0 var(--radius) var(--radius);
        transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-banner {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
.logo-banner-footer {
    height: 60px;
    width: auto;
    display: block;
    margin: 0 auto 0.5rem auto;
    object-fit: contain;
}
.project-image-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    min-height: 140px;
    width: 100%;
    position: relative;
    background: inherit;
    padding: 0;
}
.project-logo-centered {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 1.5rem;
    background: var(--surface);
    box-shadow: 0 2px 12px var(--shadow);
    margin: 0 auto;
    position: relative;
    opacity: 1;
    transform: none;
    animation: none;
    display: block;
    top: 0;
    left: 0;
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
        padding-top: 120px;
    overflow: hidden;
        background: linear-gradient(120deg, #f8f9fa 0%, #e0e7ff 100%);
        border-radius: 0 0 var(--radius) var(--radius);
}

/* Dark hero background adjustment */
[data-theme="dark"] .hero {
    background: linear-gradient(120deg, rgba(15, 17, 19, 1) 0%, rgba(28, 32, 38, 1) 100%);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1s cubic-bezier(.4,2,.3,1);
    padding: 4rem 2rem 4rem 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #7f5af0 0%, #2cb67d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1.1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #7f5af0 0%, #2cb67d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    background: var(--surface);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card);
        border-radius: var(--radius);
    overflow: hidden;
        transition: all 0.4s cubic-bezier(.4,2,.3,1);
        border: 1.5px solid var(--border);
    cursor: pointer;
        box-shadow: var(--shadow);
        backdrop-filter: var(--glass-blur);
        position: relative;
        min-height: 420px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

.project-image {
    overflow: hidden;
}
.project-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 2px 12px var(--shadow);
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    animation: logoFadeIn 1s 0.2s forwards;
}
@keyframes logoFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.project-image-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-image-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-image-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.project-category {
    background: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

[data-theme="dark"] .project-category {
    background: rgba(23, 25, 28, 0.85);
    color: var(--text-primary);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--surface);
    color: var(--text-secondary);
    padding: 0.375rem 0.875rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.project-status {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Services Section */
.services {
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(18px);
    border: 1.5px solid var(--border);
    padding: 2.5rem 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--surface);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(127,90,240,0.08);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 1.1rem 1rem;
    border: 2px solid var(--border);
    border-radius: 1rem;
    font-family: inherit;
    font-size: 1.08rem;
    transition: all 0.3s cubic-bezier(.4,2,.3,1);
    background: var(--card);
    box-shadow: 0 2px 8px rgba(127,90,240,0.06);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-size: 1.08rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 0 1.5rem 1.5rem;
}

.info-item h4 {
    display: none;
}

.info-item p {
    color: var(--text-secondary);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.08rem;
}
.social-link:hover {
    color: var(--secondary-color);
}
.social-icon-link {
    margin-bottom: 0.5rem;
}
.social-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.social-link:hover {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--card);
    color: var(--text-primary);
    padding: 3.5rem 0 2rem;
    border-radius: 2rem 2rem 0 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.footer-brand .logo {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    text-align: left;
    padding-right: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Footer bottom layout and theme toggle */
.footer-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.theme-toggle:hover {
    box-shadow: 0 6px 18px var(--shadow);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.developer-name {
    font-weight: 700;
    background: linear-gradient(90deg, #7f5af0 0%, #2cb67d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: transparent;
        flex-direction: column;
        padding: 2rem;
        box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 20px;
        transform: translateX(-100%);
        border-bottom: 1px solid var(--border);
        border-radius: 0 0 2rem 2rem;
        z-index: 999;
        bottom: 0;
        min-height: calc(100vh - 70px);
        will-change: transform, backdrop-filter, background-color;
        transition: transform 0.3s ease, background-color 0.3s ease;
    }

    .nav-links::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);  /* Light mode default */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        opacity: 0;
        transition: opacity 0.3s ease, background-color 0.3s ease;
        z-index: -1;
        border-radius: 0 0 2rem 2rem;
    }

    .nav-links .nav-link {
        color: var(--text-primary);
        font-weight: 600;
    }

    /* Dark theme styles */
    [data-theme="dark"] .nav-links::before {
        background: rgba(23, 25, 28, 0.85);
    }

    /* System dark mode when no theme is selected */
    @media (prefers-color-scheme: dark) {
        :root:not([data-theme]) .nav-links::before {
            background: rgba(23, 25, 28, 0.85);
        }
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links.active::before {
        opacity: 1;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark theme: slightly different overlay tint to show blur well */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-links {
        background-color: rgba(15,17,19,0.55);
    }
}

/* Prevent background scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}
