/* CSS Variables for consistent theming */
:root {
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5; /* Darker Indigo */
    --secondary-color: #10b981; /* Emerald */
    --dark-bg: #0d1117; /* GitHub Dark background */
    --card-bg: #161b22; /* Slightly lighter dark for cards */
    --text-primary: #f0f6fc; /* Light text */
    --text-secondary: #8b949e; /* Grey text */
    --border-color: #30363d; /* Border color */
    --header-bg: #161b22; /* Header background */
    --body-bg: #0d1117; /* Body background */
    --hover-bg: #21262d; /* Background for hover states */
}

/* Universal box-sizing and reset margins/paddings */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Body styling for font, line height, background, and text color */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-primary);
}

/* Header styling for sticky position, background, and border */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Container for content width and centering */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header container for flex layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo styling for font, size, and color */
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

/* Logo SVG icon styling */
.logo img {
    margin-right: 0.75rem;
}

/* Navigation list styling */
nav ul {
    list-style: none;
    display: flex;
}

/* Navigation list item styling */
nav ul li {
    margin-left: 1.5rem;
}

/* Navigation link styling with hover effect and underline animation */
nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero section styling with gradient background and text alignment */
.hero {
    background: linear-gradient(120deg, var(--header-bg), var(--dark-bg));
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* Hero heading styling with gradient text */
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Hero paragraph styling */
.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

/* Button base styling */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

/* Button hover effect */
.btn:hover {
    background-color: var(--primary-hover);
}

/* Outline button styling */
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 1rem;
}

/* Outline button hover effect */
.btn-outline:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Main content area padding */
main {
    padding: 3rem 0;
}

/* Section spacing */
section {
    margin-bottom: 4rem;
}

/* Section heading styling with underline */
h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Card container for grid layout */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Card base styling with border, border-radius, and transitions */
.card {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Card hover effects */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

/* Card heading styling with icon alignment */
.card h3 {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

/* Card heading SVG icon styling */
.card h3 svg {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

/* Card meta information styling */
.card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Card meta item styling */
.card-meta div {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

/* Card meta SVG icon styling */
.card-meta svg {
    margin-right: 0.25rem;
}

/* Project card paragraph styling */
.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Project links alignment */
.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Team member card styling */
.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Team avatar styling for circular shape and background */
.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--hover-bg);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    overflow: hidden;
}

/* Team avatar image styling */
.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stats section layout */
.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

/* Individual stat item styling */
.stat-item {
    text-align: center;
    flex: 1;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    margin: 0 0.75rem;
    border: 1px solid var(--border-color);
}

.stat-item:first-child {
    margin-left: 0;
}

.stat-item:last-child {
    margin-right: 0;
}

/* Stat value styling with gradient text */
.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Stat label styling */
.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Community banner styling with gradient background */
.community-banner {
    background: linear-gradient(135deg, #2a3240, #1a2030);
    border-radius: 0.5rem;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* Community banner heading */
.community-banner h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

/* Community banner paragraph */
.community-banner p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer styling */
footer {
    background-color: var(--header-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

/* Footer content layout */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Footer column styling */
.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1.5rem;
}

/* Footer column heading */
.footer-column h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Footer column list styling */
.footer-column ul {
    list-style: none;
}

/* Footer column list item styling */
.footer-column li {
    margin-bottom: 0.5rem;
}

/* Footer column link styling with hover effect */
.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary-color);
}

/* Social links container */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Social link button styling */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--hover-bg);
    color: var(--text-primary);
    transition: background-color 0.2s, transform 0.2s;
}

/* Social link hover effects */
.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer bottom section for copyright and additional links */
.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Footer bottom paragraph styling */
.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animation for sections fading in */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; /* Optimize for animation */
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        justify-content: center;
    }

    nav ul li:first-child {
        margin-left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats {
        flex-direction: column;
    }

    .stat-item {
        margin: 0.75rem 0;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
