:root {
    --bg-color: #0d1117;
    --surface-color: #161b22;
    --surface-hover: #21262d;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #79c0ff;
    --border-color: #30363d;
    --danger: #f85149;
    --gradient-1: linear-gradient(145deg, #1f6feb, #58a6ff);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.4);
    --radius-md: 12px;
    --radius-lg: 24px;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Merriweather', serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.logo h1 {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-hover);
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(88, 166, 255, 0.5);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff, #8b949e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(88,166,255,0.15) 0%, rgba(13,17,23,0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Projects Section */
.portfolio-category {
    margin-bottom: 4rem;
}

.portfolio-category-title {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.project-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--text-muted);
}

.project-image-container {
    width: 100%;
    height: 220px;
    background: var(--surface-hover);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Logos Grid (For Proposal writing) */
.logos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.logo-item {
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    width: 100px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* List format for stories/proposals */
.resource-list {
    list-style: none;
    margin-top: 1rem;
}

.resource-list li {
    margin-bottom: 0.8rem;
    background: var(--surface-hover);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.resource-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Middleman Tag */
.middleman-tag {
    font-size: 0.8rem;
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Founders */
.founders-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.founder-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 250px;
}

.founder-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.founder-card p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-info h2 {
    margin-bottom: 1rem;
}

.footer-info p {
    color: var(--text-muted);
}

.footer-contact {
    text-align: right;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* @media print for PDF export */
@media print {
    :root {
        --bg-color: #ffffff;
        --surface-color: #f6f8fa;
        --surface-hover: #eaeef2;
        --text-main: #24292f;
        --text-muted: #57606a;
        --accent-color: #0969da;
        --border-color: #d0d7de;
        --gradient-1: #0969da;
    }

    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background: var(--bg-color);
        color: var(--text-main);
    }

    .no-print {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding-top: 0;
        margin-bottom: 2rem;
    }

    .hero-background {
        display: none;
    }

    .hero-title {
        background: none;
        color: var(--text-main);
        -webkit-text-fill-color: initial;
        font-size: 3rem;
    }

    .section-title {
        background: none;
        color: var(--text-main);
        -webkit-text-fill-color: initial;
        page-break-after: avoid;
    }

    .navbar {
        position: static;
        background: none;
        border-bottom: 2px solid var(--text-main);
        padding-bottom: 1rem;
        margin-bottom: 2rem;
    }

    .service-card {
        break-inside: avoid;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }
    
    .services-grid {
        display: flex; /* Prevent bad grid breaks in print */
        gap: 1rem;
        flex-wrap: wrap;
    }
    .service-card {
        flex: 1;
        min-width: 250px;
    }

    .portfolio-category {
        break-inside: auto; /* Let categories split across pages */
        page-break-inside: auto;
    }

    .project-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        padding: 1rem;
    }

    .projects-grid {
        display: block; /* Disable CSS Grid to allow sequential page breaking */
    }

    .project-image-container {
        width: 200px;
        height: 150px;
        flex-shrink: 0;
    }

    .project-content {
        padding: 0;
    }

    .resource-list li {
        page-break-inside: avoid;
    }

    .footer {
        page-break-inside: avoid;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 17, 23, 0.95);
        backdrop-filter: blur(15px);
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        padding: 0.8rem 2rem;
        width: 100%;
        text-align: left;
    }

    .main-nav .btn-primary {
        margin: 0.5rem 2rem;
        width: calc(100% - 4rem);
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-contact {
        text-align: center;
    }
}
