* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
}

body {
    background: #f5f7fb;
}

/* Original Page Width preserved exactly as provided */
.container {
    width: 92%;
    max-width: 1400px;
    margin: 20px auto;
}

.top-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-back {
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #0077B6;
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #3A8FE8;
    transform: translateY(-1px);
}

.btn-back:active {
    transform: scale(0.98);
}

.btn-link {
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #0077B6;
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    background: #3A8FE8;
    transform: translateY(-1px);
}

.btn-link:active {
    transform: scale(0.98);
}

/* Smaller, responsive top-action button defaults */
.top-actions .btn-back,
.top-actions .btn-link {
    padding: 8px 10px;
    font-size: clamp(13px, 1.2vw, 15px);
    border-radius: 10px;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-card {
    background: white;
    padding: 40px;
    border-radius: 18px;
    margin-bottom: 25px;
    border: 1px solid #e6e6e6;
    text-align: center;
}

.hero-card h1 {
    font-size: 42px;
    margin-bottom: 10px;
    color: #0077b6;
}

.hero-card p {
    font-size: 18px;
    color: #64748b;
}

/* --- PREMIUM REDESIGNED PROFILE SUMMARY SECTION --- */
.profile-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #E6EDF5;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-section h2 {
    margin-bottom: 28px;
    font-size: 32px;
    font-weight: 700;
    color: #0077b6;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: stretch;
}

.profile-grid .profile-item {
    background: #ffffff;
    border: 1px solid #E6EDF5;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    box-shadow: 0 4px 12px rgba(15, 36, 84, 0.02), 0 1px 2px rgba(15, 36, 84, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    min-width: 0;
}

.profile-grid .profile-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 36, 84, 0.06), 0 2px 4px rgba(15, 36, 84, 0.02);
}

.profile-grid .profile-item > i {
    width: 48px;
    height: 48px;
    background: #E8F4FD;
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #0077B6;
    font-size: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.profile-grid .profile-item .profile-label {
    font-size: 14px;
    font-weight: 500;
    color: #667085;
    margin-bottom: 8px;
    line-height: 1.4;
}

.profile-grid .profile-item .profile-value {
    font-size: 20px;
    font-weight: 600;
    color: #0F2454;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    width: 100%;
}

.profile-grid .profile-item .profile-value.scrollable {
    max-height: 160px;
    overflow-y: auto;
    padding-right: 8px;
}

.profile-grid .profile-item .profile-value.scrollable::-webkit-scrollbar {
    width: 6px;
}

.profile-grid .profile-item .profile-value.scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.profile-grid .profile-item .profile-value.scrollable::-webkit-scrollbar-thumb {
    background: #0077B6;
    border-radius: 3px;
}

.profile-grid .profile-item .profile-value.scrollable::-webkit-scrollbar-thumb:hover {
    background: #005f91;
}

/* --- RECOMMENDED COLLEGES SECTION --- */
.college-section {
    background: white;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid #e6e6e6;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #0077b6;
}

.college-count {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    background: #f0f9ff;
    padding: 8px 16px;
    border-radius: 20px;
}

.college-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.college-card {
    position: relative;
    padding: 24px;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.college-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.bookmark {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #0077B6;
    transition: color 0.2s ease;
}

.bookmark:hover {
    color: #00B4D8;
}

.college-card p i {
    color: #0077B6;
}

.bookmark.saved {
    font-weight: 900;
}

.college-card h3 {
    margin-bottom: 12px;
    padding-right: 40px; /* space for bookmark */
    line-height: 1.25;
    color: #0F2454;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: unset;
}

.college-card p {
    margin-bottom: 12px;
    color: #64748b;
}

.score {
    margin-top: auto; 
    background: #eef9ef;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score span {
    color: #16803d;
    font-weight: 600;
}

.score strong {
    color: #16803d;
    font-size: 18px;
}

/* --- RESPONSIVE PROFILE BREAKPOINTS (As original spec) --- */
@media(max-width:1200px) {
    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .college-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        margin-top: 20px;
        align-items: stretch;
    }
}

@media(max-width:1024px) {
    .profile-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:768px) {
    .profile-grid,
    .college-grid {
        grid-template-columns: 1fr;
    }
    .hero-card h1 {
        font-size: 32px;
    }
}

/* Additional mobile fixes: reduce paddings, clamp long titles, and adjust grid columns */
@media (max-width:768px) {
    .container {
        width: 96%;
        margin: 12px auto;
    }

    .hero-card {
        padding: 20px;
        border-radius: 12px;
    }

    .hero-card h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .hero-card p {
        font-size: 14px;
    }

    .profile-section {
        padding: 18px;
    }

    .profile-section h2 {
        font-size: 20px;
    }

    .college-section {
        padding: 18px;
    }

    .college-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .college-card {
        padding: 16px;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15,23,42,0.06);
        min-height: unset;
        height: auto;
    }

    .college-card h3 {
        margin-bottom: 10px;
        padding-right: 40px;
        line-height: 1.25;
        font-size: 18px;
        word-break: break-word;
        overflow-wrap: anywhere;
        white-space: normal;
        min-height: unset;
    }

    .college-card p {
        font-size: 13px;
    }

    .score {
        padding: 10px;
        border-radius: 8px;
    }

    .bookmark {
        right: 12px;
        top: 12px;
        font-size: 20px;
    }
}

@media (max-width:480px) {
    .hero-card h1 { font-size: 20px; }
    .profile-section h2 { font-size: 18px; }
    .college-card h3 { font-size: 16px; }
}

/* Top actions and header adjustments to prevent overflow on narrow screens */
@media (max-width:768px) {
    .top-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .top-actions .btn-back,
    .top-actions .btn-link {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-header h2 {
        margin: 0;
        font-size: 20px;
        word-break: break-word;
        min-width: 0;
    }

    .college-count {
        margin: 0;
        font-size: 14px;
        padding: 6px 12px;
    }
}