/* coursework poup (popup window itself) */
.overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 50, 0, 0.7);
    /* Black with opacity */
    z-index: 100;
}

/* The actual white box */
.modal-content {
    background-color: rgba(0, 0, 0, 0.7);
    margin: auto;
    margin-top: 5%;
    width: 80%;
    height: 80%;
    border: none;
    border-radius: 8px;
    position: relative;
}

/* The actual white box (mobile view) */
@media (max-width: 768px) {
    .modal-content {
        margin-top: 2%;
        width: 90%;
        height: 95%;
        border: none;
        border-radius: 8px;
        position: relative;
    }
}

/* Coursework iframe inside */
#iframe-coursework {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.close-x {
    position: absolute;
    top: 15px;
    /* Moves it slightly above the box edge */
    right: 25px;
    /* Moves it slightly outside the box edge */
    /* Circle Styling */
    width: 30px;
    height: 30px;
    background-color: #333;
    /* Dark circle */
    color: white;
    /* White 'X' */
    border-radius: 5px;
    /* Makes it a circle */
    /* Centering the 'X' inside the circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s;
    /* Smooth hover effect */
}

.close-x:hover {
    background-color: #ff4d4d;
    /* Turns red when hovered */
}

/* coursework popup (internal) */
.coursework-container {
    padding: 2%;

}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
}

.filter-btn.active {
    background: linear-gradient(90deg, #fff1 0%, #fff0 100%);
    color: #fff;
    border-color: #2d4a2b;
}

.item {
    background: var(--card);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.12s;
}

.item.hide {
    display: none;
}

.item h4 {
    margin: 0 0 6px 0;
}

.cat {
    font-size: 12px;
    color: var(--muted);
}

/* contact styling */
#contact .content-fit {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}


#contact table {
    width: min(800px, 90vw);
    padding-top: 2em;
    font-size: 1.5em;
    margin: auto;
}

#contact table td {
    padding-block: 0.5em;
    border-bottom: 1px dashed #445022;
}

#contact table td:nth-child(1) {
    text-align: left;
    font-weight: 500;
}

#contact table td:nth-child(2) {
    text-align: right;
    font-weight: 200;
}

#grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}