/* Basic reset */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --theme-color: #00005e;
    --accent-color: #f39c12;
    --button-hover-color: #00005e;
    --button-hover-bg: #f39c12;
}

body {
    background-color: #f4f4f4;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Container to center card */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Card styles */
.card {
    width: 100%;
    max-width: 320px;  /* Set a maximum width for the card */
    background: linear-gradient(to bottom, var(--theme-color) 120px, #ffffff 120px);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(50, 50, 50, 0.1);
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
    margin: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease; /* Add smooth transitions */
}

/* Header part: profile picture and name */
.card header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

/* Profile image */
.card img {
    width: 100px;  /* Fixed size to maintain aspect ratio */
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    border: 5px solid #fff;
    box-shadow: 0 0 0 5px var(--theme-color);
    object-fit: cover;  /* Ensures the image doesn't stretch */
}

/* Name and job title */
.card h4 {
    color: var(--theme-color);
    font-size: 20px;
    margin: 15px 0 5px 0;
}

.card h5 {
    color: #454545;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Details section styling */
.details {
    margin-top: 20px;
}

.details span {
    display: block;
    font-size: 14px;
    color: var(--theme-color);
    font-weight: 500;
    margin-top: 5px;
}

/* Button styling */
.buttons {
    margin-top: 25px;
}

.buttons button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: var(--theme-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buttons button:hover {
    background-color: var(--button-hover-bg);
    color: white;
}

.edit-btn, .export-btn {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
}

.edit-btn:hover, .export-btn:hover {
    background-color: var(--theme-color);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: left;
}

.modal-content label {
    display: block;
    margin-top: 10px;
}

.modal-content input {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
}

.modal-content button {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: var(--theme-color);
}

/* Media Queries for Scaling the Card */
@media (max-width: 768px) {
    .card {
        max-width: 90%;  /* Make the card wider on smaller screens */
        padding: 30px 10px;
    }

    .card img {
        width: 30vw;
        height: 30vw;
    }

    .card h4 {
        font-size: 5vw;
    }

    .card h5 {
        font-size: 4vw;
    }
}

@media (max-width: 480px) {
    .card {
        max-width: 95%;  /* Allow the card to be even more flexible */
        padding: 20px 5px;
    }

    .card img {
        width: 35vw;
        height: 35vw;
    }

    .card h4 {
        font-size: 6vw;
    }

    .card h5 {
        font-size: 5vw;
    }

    .buttons button {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 1024px) {
    .card {
        max-width: 400px; /* Limit the max-width for larger screens */
        padding: 50px 10px;
    }

    .card img {
        width: 120px;
        height: 120px;
    }

    .card h4 {
        font-size: 24px;
    }

    .card h5 {
        font-size: 18px;
    }
}
