:root {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent-1: #2563eb;
    --accent-2: #7c3aed;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --pill-bg: #f1f5f9;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

body.dark-theme {
    --bg-color: #0b0f19;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --card-bg: #111827;
    --card-border: #374151;
    --pill-bg: #1e293b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    transform: scale(1.1);
}

/* Subtle Background Effects for Light Theme */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.03), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.03), transparent 25%);
}

.glow-orb {
    display: none; /* Removed the heavy glowing orbs for a cleaner brochure look */
}

/* Container simulating a physical brochure */
.brochure-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 60px 80px;
    background-color: var(--card-bg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    border: 1px solid var(--card-border);
}

/* Print-specific layout to ensure the brochure-container fills the page */
@media print {
    body {
        background-color: #fff;
    }
    .brochure-container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        max-width: none;
    }
}

.section {
    margin-bottom: 70px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s forwards ease-out;
}

.section:last-child {
    margin-bottom: 0;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    display: inline-block;
    color: var(--text-main);
    padding-bottom: 10px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    border-radius: 2px;
}

/* Reusable Card Style */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hero Section */
.hero {
    text-align: center;
}

.hero .glass-panel {
    padding: 60px 40px;
    background: linear-gradient(to bottom right, var(--card-bg), var(--bg-color));
    border-top: 4px solid var(--accent-1);
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.team-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-1);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* About Section */
.content-box {
    text-align: center;
}

.content-box p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-muted);
    line-height: 1.8;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.skill-tag {
    background: var(--pill-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    padding: 30px;
}

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

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.service-card ul {
    list-style: none;
}

.service-card ul li {
    margin-bottom: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.service-card ul li::before {
    content: '•';
    color: var(--accent-1);
    margin-right: 10px;
    font-size: 1.5rem;
    line-height: 1;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    padding: 20px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

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

.project-img-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 16/9;
    background: #f1f5f9;
    border: 1px solid var(--card-border);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-1);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge.in-production { background: #10b981; }
.status-badge.in-early-access { background: #f59e0b; }
.status-badge.in-development { background: #3b82f6; }
.status-badge.in-testing { background: #8b5cf6; }

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.demo-msg {
    color: var(--accent-1) !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    margin-top: 5px !important;
}

.project-card.no-link {
    cursor: default;
}

.project-card.no-link:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.project-card.no-link:hover .project-img-wrapper img {
    transform: none;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    text-align: center;
}

.contact-card {
    padding: 25px 15px;
}

.avatar {
    width: 55px;
    height: 55px;
    background: #f1f5f9;
    color: var(--accent-1);
    border: 2px solid var(--accent-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 15px;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-link {
    color: var(--accent-1);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

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

.contact-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Print Styles for PDF Export Brochure */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm; /* Minimal margins */
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background-color: #fff !important;
        zoom: 0.65; /* Scale down the entire document to fit on one page */
        --bg-color: #f8fafc !important;
        --text-main: #0f172a !important;
        --text-muted: #475569 !important;
        --card-bg: #ffffff !important;
        --card-border: #e2e8f0 !important;
        color: #0f172a !important;
    }
    
    .theme-toggle {
        display: none !important;
    }

    .background-effects {
        display: none;
    }

    .brochure-container {
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: none !important;
    }

    .section {
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .section-title {
        margin-bottom: 10px !important;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
        padding-bottom: 5px;
    }

    .glass-panel {
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        padding: 10px !important; /* Minimized padding */
    }
    
    .project-card, .service-card, .contact-card {
        break-inside: avoid;
    }

    .service-icon {
        margin-bottom: 5px;
        font-size: 1.5rem;
    }

    .hero .glass-panel {
        padding: 20px 10px !important;
    }
    
    .gradient-text {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        margin-bottom: 15px;
        font-size: 1.1rem;
    }

    /* Keep grid layouts for print */
    .services-grid, .portfolio-grid, .contact-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important; /* Minimized gap */
    }

    .project-img-wrapper {
        margin-bottom: 5px !important;
    }

    .project-info h3 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .content-box p {
        font-size: 0.95rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .skill-tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    a {
        text-decoration: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .brochure-container {
        margin: 20px;
        padding: 40px 20px;
    }
    .gradient-text { font-size: 2.2rem; }
    .services-grid, .portfolio-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
}
