<%- include("navbar") %>

    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">

    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #0f172a, #1e293b);
            min-height: 100vh;
            overflow-y: hidden;
        }

        /* Layout */
        .profile-wrapper {
            margin-left: 250px;
            margin-top: 70px;
            padding: 40px;
        }

        /* Hero Header */
        .profile-hero {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            padding: 40px;
            border-radius: 20px;
            color: white;
            box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
            margin-bottom: 40px;
        }

        .profile-hero h2 {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .profile-hero p {
            opacity: .9;
            font-size: 14px;
        }

        /* Main Card */
        .profile-card {
            background: white;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 40px;
        }

        /* Avatar */
        .avatar {
            width: 140px;
            height: 140px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1, #22d3ee);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 50px;
            color: white;
            font-weight: 600;
            margin: auto;
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
        }

        /* Info */
        .profile-info h3 {
            font-weight: 600;
            margin-bottom: 15px;
            font-size: 22px;
        }

        .profile-info p {
            margin: 10px 0;
            font-size: 14px;
            color: #334155;
        }

        .label {
            font-weight: 500;
            color: #64748b;
        }

        /* Stats Section */
        .stats-grid {
            margin-top: 40px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
        }

        .stat-card {
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            text-align: center;
            transition: .3s;
        }

        .stat-card:hover {
            transform: translateY(-5px);
        }

        .stat-card h4 {
            font-size: 22px;
            color: #6366f1;
            margin-bottom: 5px;
        }

        .stat-card p {
            font-size: 13px;
            color: #64748b;
        }

        /* Button */
        .btn-edit {
            margin-top: 20px;
            display: inline-block;
            padding: 10px 20px;
            border-radius: 10px;
            background: linear-gradient(90deg, #6366f1, #22d3ee);
            color: white;
            text-decoration: none;
            font-size: 14px;
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
            transition: .3s;
        }

        .btn-edit:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
        }

        /* Responsive */
        @media(max-width:992px) {
            .profile-wrapper {
                margin-left: 0;
                padding: 20px;
            }

            .profile-card {
                grid-template-columns: 1fr;
                text-align: center;
            }
        }
    </style>

  <div class="profile-wrapper">

    <!-- HERO SECTION -->
    <div class="profile-hero">
        <h2>My Profile 👤</h2>
        <p>Manage your personal details and track your performance</p>
    </div>

    <!-- MAIN PROFILE CARD -->
    <div class="profile-card">

        <!-- Avatar -->
        <div>
            <div class="avatar">
                <%= student.name.charAt(0).toUpperCase() %>
            </div>
        </div>

        <!-- Info -->
        <div class="profile-info">

            <h3>
                <%= student.name %>
            </h3>

            <p>
                <span class="label">Email:</span>
                <%= student.email %>
            </p>

            <p>
                <span class="label">Mobile:</span>
                <%= student.mobile %>
            </p>

            <p>
                <span class="label">Member Since:</span>
                <%= new Date(student.created_at).toLocaleDateString('en-IN') %>
            </p>

        </div>

    </div>

    <!-- STATS SECTION -->
    <div class="stats-grid">

        <div class="stat-card">
            <h4><%= totalCourses || 0 %></h4>
            <p>Total Courses</p>
        </div>

        <div class="stat-card">
            <h4><%= totalQuizzes || 0 %></h4>
            <p>Quiz Attempts</p>
        </div>

        <div class="stat-card">
            <h4><%= overallRank || '-' %></h4>
            <p>Overall Rank</p>
        </div>

    </div>

</div>

    <%- include("footer") %>