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

/* Body with Gradient Background */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea; /* Fallback for browsers without background-clip support */
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Section Styles */
section {
    margin-bottom: 2.5rem;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* About Section */
.about p {
    color: #555;
    font-size: 1rem;
    line-height: 1.8;
}

/* Connect Section */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.social-icon {
    font-size: 1.2rem;
}

/* Projects Section */
.project-grid {
    display: grid;
    /* 220px minimum ensures cards have enough width for readable content */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.project-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #764ba2;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.footer p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.attribution {
    font-size: 0.85rem;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.75rem;
    }

    .container {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .name {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

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

    .name {
        font-size: 1.75rem;
    }

    .social-links {
        flex-direction: column;
        align-items: stretch;
    }

    .social-link {
        justify-content: center;
    }

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