/* ========================================= */
/* Student Contribution Website - Stylesheet */
/* ========================================= */

/* ========================================= */
/* CSS Variables - Easy theme management */
/* These allow us to easily change colors for dark mode */
/* ========================================= */
:root {
    /* Light Mode Colors */
    --bg-primary: #eef2ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);
    --text-primary: #1f2937;
    --text-secondary: #556672;
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: #eef2ff;
    --shadow-light: 0 16px 40px rgba(79, 70, 229, 0.12);
    --shadow-medium: 0 24px 60px rgba(79, 70, 229, 0.16);
    --border-color: #dbe4ff;
    --card-border: #e5e9ff;
}

/* ========================================= */
/* Dark Mode Colors */
/* Applied when body has class "dark-mode" */
/* ========================================= */
body.dark-mode {
    --bg-primary: #111827;
    --bg-secondary: #111827;
    --bg-card: #1f2937;
    --bg-header: rgba(17, 24, 39, 0.95);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-color: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-soft: rgba(124, 58, 237, 0.12);
    --shadow-light: 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-medium: 0 24px 60px rgba(0, 0, 0, 0.45);
    --border-color: #374151;
    --card-border: #334155;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 32%),
                radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.18), transparent 28%),
                var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ========================================= */
/* Container - Limits width for better readability */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================= */
/* HEADER STYLES */
/* ========================================= */
.header {
    background-color: var(--bg-header);
    padding: 22px 0;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.brand-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-title {
    font-size: 1.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.site-tagline {
    color: var(--text-secondary);
    font-size: 0.98rem;
    max-width: 420px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ========================================= */
/* Dark Mode Button */
/* Circular button with emoji icon */
.dark-mode-btn {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.dark-mode-btn:hover {
    transform: scale(1.06);
    border-color: var(--accent-color);
}

/* ========================================= */
/* Contributor Counter */
/* Shows how many students have contributed */
.contributor-counter {
    background-color: var(--bg-card);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.counter-number {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.12rem;
}

/* ========================================= */
/* Hero Section */
/* Large welcome message at top */
.hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(99, 102, 241, 0.95));
    color: white;
    padding: 72px 0 58px;
    text-align: center;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 30%),
                radial-gradient(circle at bottom right, rgba(255,255,255,0.12), transparent 28%);
    pointer-events: none;
}

.hero h2 {
    position: relative;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.hero-text {
    position: relative;
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

.hero-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.98);
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.24);
}

/* ========================================= */
/* Cards Section */
/* ========================================= */
.cards-section {
    padding: 58px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

/* ========================================= */
/* Cards Container */
/* Uses CSS Grid for responsive layout */
/* ========================================= */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}

/* ========================================= */
/* Student Card Styles */
/* Each student's card has hover effects */
.student-card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    top: -26px;
    right: -30px;
    background: var(--accent-soft);
}

.student-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.student-card h3 {
    font-size: 1.45rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.student-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.85;
}

/* ========================================= */
/* GitHub Guide Section */
/* ========================================= */
.github-guide {
    background-color: var(--bg-secondary);
    padding: 60px 0 72px;
}

.guide-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================= */
/* Steps Container */
/* Grid layout for step cards */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* ========================================= */
/* Step Card Styles */
/* Each GitHub step has its own card */
.step-card {
    background-color: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    padding: 32px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    height: 6px;
    width: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.step-number {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.step-card h3 {
    font-size: 1.18rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.75;
}

/* ========================================= */
/* Code Snippets */
/* Inline code styling */
code {
    background-color: var(--accent-soft);
    padding: 6px 10px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: var(--accent-color);
}

/* ========================================= */
/* Footer */
/* ========================================= */
.footer {
    background-color: var(--bg-secondary);
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--card-border);
}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* Mobile adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .hero {
        padding: 54px 0 48px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .cards-container,
    .steps-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 16px 0;
    }

    .site-title {
        font-size: 1.35rem;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero-button {
        width: 100%;
        padding: 16px 0;
    }
}
