﻿:root {
    --primary-color: #0070f3;
    --primary-dark: #0051cc;
    --secondary-color: #7c3aed;
    --accent-color: #10b981;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #888888;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-code: #f1f5f9;
    --bg-dark: #0f172a;
    --border-light: #e2e8f0;
    --border-code: #cbd5e1;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero .description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

/* Tech Stack */
.tech-stack {
    background: var(--bg-secondary);
    padding: 3rem 0;
}

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

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-4px);
}

.tech-item .icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: 0.5rem;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Section Headers */
.section {
    padding: 5rem 0;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Project Cards */
.projects-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}

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

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.project-card:nth-child(even) .project-content {
    direction: rtl;
}

.project-card:nth-child(even) .project-info {
    direction: ltr;
}

.project-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-features {
    list-style: none;
    margin-bottom: 2rem;
}

.project-features li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 600;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.project-image {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
}

.project-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(4px);
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .section {
        padding: 3rem 0;
    }

    .project-content {
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(even) .project-content {
        direction: ltr;
    }

    .project-image {
        height: 250px;
    }

    .project-info {
        padding: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .project-info {
        padding: 1.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Project Actions (for the updated cards with multiple links) */
.project-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.link-separator {
    color: var(--border-light);
    font-weight: 300;
}

/* External link styling */
.project-link[target="_blank"]::after {
    content: '↗';
}

.project-link[target="_blank"]:hover::after {
    transform: translate(2px, -2px);
}

/* Detail Page Specific Styles */
.breadcrumb {
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.project-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background: var(--bg-secondary);
}

.problem-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.problem-box, .solution-box {
    padding: 2rem;
    border-radius: 1rem;
    position: relative;
}

.problem-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
}

.solution-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid var(--accent-color);
}

.problem-box h3, .solution-box h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Code Examples */
.code-example {
    background: var(--bg-code);
    border: 1px solid var(--border-code);
    border-radius: 0.75rem;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.code-example pre code {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.code-title {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 2rem 0 0 0;
}

/* Architecture Diagram */
.architecture-diagram {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.diagram-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.diagram-box {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.diagram-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Pipeline Diagram (Katharsi specific) */
.pipeline-diagram {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
}

.pipeline-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.pipeline-stage {
    background: var(--bg-secondary);
    border: 2px solid var(--primary-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.pipeline-stage h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.pipeline-stage::after {
    content: '→';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
}

.pipeline-stage:last-child::after {
    display: none;
}

/* Impact Stats / Team Stats */
.impact-stats, .team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Technical Details */
.tech-detail {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.tech-detail h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.tech-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Timeline (Katharsi specific) */
.timeline {
    position: relative;
    margin: 3rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 5rem;
}

.timeline-marker {
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
}

.timeline-content {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Additional mobile responsiveness for detail pages */
@media (max-width: 768px) {
    .problem-solution {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .diagram-flow {
        flex-direction: column;
    }

    .diagram-arrow {
        transform: rotate(90deg);
    }

    .pipeline-flow {
        grid-template-columns: 1fr;
    }

    .pipeline-stage::after {
        content: '↓';
        right: 50%;
        top: auto;
        bottom: -1.5rem;
        transform: translateX(50%);
    }

    .pipeline-stage:last-child::after {
        display: none;
    }

    .content-section {
        padding: 2rem 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 1rem;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-marker {
        left: 0;
    }
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.use-case-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-4px);
}

.use-case-header {
    padding: 1.5rem;
    background: var(--gradient-accent);
    color: white;
}

.use-case-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.use-case-body {
    padding: 1.5rem;
}