:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --accent: #10b981;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

.site-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
}

footer .site-icon {
    filter: brightness(0) invert(1) !important; /* Force white color in dark footer */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
nav {
    padding: 1.25rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
}

nav.scrolled {
    background: var(--glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 11rem 0 6rem;
    background: radial-gradient(circle at top right, #eef2ff, #f8fafc);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--dark);
    font-weight: 800;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    max-width: 540px;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

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

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow);
}

/* Projects Section */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--white);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.link-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Global Split Card System */
.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.horizontal-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 2.5rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%;
}

.horizontal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.horizontal-card .card-icon {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.horizontal-card .card-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 1.5rem;
    padding: 1rem;
}

.horizontal-card .card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-body {
    flex: 1;
}

.card-body h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-body p {
    font-size: 0.95rem;
    color: var(--secondary);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .grid-2x2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .horizontal-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .horizontal-card .card-icon, .horizontal-card .card-image {
        margin-bottom: 1rem;
    }
}

/* Technology Stack */
.tech-section {
    background: #0f172a;
    color: white;
    padding: 6rem 0;
    overflow: hidden;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tech-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.tech-item i {
    font-size: 2.5rem;
}

.tech-item span {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-info p {
    color: #94a3b8;
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
    color: #94a3b8;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 0.85rem;
}

/* Responsive Styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-text {
        order: 1;
    }
    .hero-image {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }
    .grid-2x2 {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-block !important;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 2rem;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        font-size: 1.2rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .section {
        padding: 4rem 0;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .no-scroll {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    .container {
        padding: 0 1.5rem;
    }
}
