/* Design System */
:root {
    --background: #ffffff;
    --foreground: #020817;
    --card: #ffffff;
    --card-foreground: #020817;
    --primary: #1e293b;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #1e293b;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #1e293b;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --radius: 0.5rem;
    --nav-height: 4rem;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root:not(.light) {
        --background: #020817;
        --foreground: #f8fafc;
        --card: #020817;
        --card-foreground: #f8fafc;
        --primary: #f8fafc;
        --primary-foreground: #1e293b;
        --secondary: #1e293b;
        --secondary-foreground: #f8fafc;
        --muted: #1e293b;
        --muted-foreground: #94a3b8;
        --accent: #1e293b;
        --accent-foreground: #f8fafc;
        --border: #1e293b;
        --input: #1e293b;
    }
}

/* Manual Dark Mode Toggle */
.dark {
    --background: #020817;
    --foreground: #f8fafc;
    --card: #020817;
    --card-foreground: #f8fafc;
    --primary: #f8fafc;
    --primary-foreground: #1e293b;
    --secondary: #1e293b;
    --secondary-foreground: #f8fafc;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
    --border: #1e293b;
    --input: #1e293b;
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Utility */
.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--muted-foreground);
}

.bg-muted {
    background-color: rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
    .bg-muted {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--muted-foreground);
    font-size: 1.25rem;
    max-width: 48rem;
    margin: 0 auto;
}

.about-logo {
    height: 8rem;
    margin: 0 auto 2rem;
    mix-blend-mode: multiply;
    transition: all 0.3s ease;
}

.dark .about-logo {
    mix-blend-mode: normal;
    background-color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(var(--background), 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: var(--background);
    /* Fallback if blur not supported */
}

.container-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 3.5rem;
    /* Increased size for better visibility */
    mix-blend-mode: multiply;
    transition: all 0.3s ease;
}

.dark .logo img {
    mix-blend-mode: normal;
    background-color: white;
    padding: 0.2rem;
    border-radius: var(--radius);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
}

.nav-link:hover,
.nav-link.active {
    color: #16a34a;
    /* primary-theme color from React */
    background-color: #f0fdf4;
}

.dark .nav-link:hover,
.dark .nav-link.active {
    background-color: rgba(22, 163, 74, 0.2);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

.icon-btn:hover {
    background-color: var(--secondary);
}

/* Theme Toggle Icons */
.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.dark .sun-icon {
    display: block;
}

.dark .moon-icon {
    display: none;
}

.menu-toggle {
    display: none;
    color: var(--foreground);
}

/* Hero */
.hero {
    padding-top: calc(var(--nav-height) + 5rem);
    padding-bottom: 5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.1), rgba(30, 41, 59, 0.05));
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    max-width: 48rem;
    margin: 0 auto 2.5rem;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--foreground);
    color: var(--background);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--secondary);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mt-16 {
    margin-top: 4rem;
}

.items-center {
    align-items: center;
}

/* Cards */
.card {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--muted-foreground);
}

/* About Checklist */
.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

/* Project Cards */
.card-project {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.project-image img {
    width: 100%;
    height: 15rem;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-info p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Glassmorphism */
.glass {
    background: rgba(var(--background), 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border), 0.5);
}

/* Contact Info */
.contact-info {
    max-width: 40rem;
    margin: 0 auto;
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.25rem;
    color: var(--muted-foreground);
}

/* Footer */
.footer {
    background-color: var(--foreground);
    color: var(--background);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 3rem;
    margin-bottom: 1.5rem;
    background-color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.footer-brand p {
    opacity: 0.8;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer ul li {
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.footer ul li a:hover {
    opacity: 1;
    color: #16a34a;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: var(--background);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-btns {
        flex-direction: column;
    }
}