/* CSS Variables for easy customization */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 32px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 0.925rem;
    opacity: 0.75;
    font-weight: 400;
    color: #cbd5e1;
}

/* Main Content */
main {
    flex: 1;
    padding: 0;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 80px 20px 40px 20px;
}

/* Project Card */
.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

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

.project-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    border: 1px solid #9ca3af;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

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

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.project-link-text {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.project-card:hover .project-link-text {
    color: var(--primary-hover);
    transform: translateX(5px);
}

/* Footer */
footer {
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 24px 0;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.875rem;
    }

    main {
        padding: 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 48px 20px 32px 20px;
    }

    .project-image {
        height: 200px;
    }

    .project-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeIn 0.6s ease-out forwards;
}

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