@font-face {
    font-family: "Sabon";
    src: url(fonts/Sabon_Roman.ttf)
}

* {
    padding: 0;
    margin: 0;
}

:root {
    --primary-color: rgb(51, 153, 255);
    font-size: calc(0.6rem + 0.4vw); /* Fits grid on screen */
}

html {
    font-family: "Sabon", Arial, Helvetica, sans-serif;
    box-sizing: border-box;

}

body {
    display: grid;
    min-height: 100vh;
    grid-template-rows: auto 4fr;
    grid-template-columns: 1fr 4fr;
}

.project-card a:hover, .resource a:hover {
    color: var(--primary-color);
}
/*========================================*/
/* Sidebar */
.sidebar {
    background-color: var(--primary-color);
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 20px;

    display: grid;
    align-content: flex-start;
}

.dashboard-logo {
    height: 64px;
}

nav a, .dashboard {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

nav a {
    gap: 20px;
    color: white;
    text-decoration: none;
}

nav a:hover > span{
    border-bottom: 2px solid white;
}

.settings {
    margin-top: 50px;
}

img {
    width: 1.7rem;
    height: 1.7rem;
}
/*========================================*/
/* Header */
.dashboard-header {
    grid-column: 2;
    grid-row: 1;
    margin: 10px 30px;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 2fr 1fr;
}

/* Top Header */
.search-container {
    grid-row: 1;
    grid-column : 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-input {
    flex: 1;
    border-radius: 15px;
    height: 1.5rem;
    background-color: lightgray;
    border: none;
    padding: 1rem;
}

.profile-container {
    grid-row: 1;
    grid-column : 2;
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.profile-image {
    border-radius: 50%;
    height: 3rem;
    width: 3rem;
}

.profile-container a {
    text-decoration: none;
    color: black;
}

.profile-container a:hover {
    color: var(--primary-color);
}

/* Bottom Header */
.welcome-container {
    font-weight: bold;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: auto 1fr;
    gap: 0.3rem .5rem;
}

.main-profile-image {
    grid-row: 1 / 3;
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
    justify-self: end;
    align-self: center;
}

.welcome-text {
    font-size: .9rem;
    align-self: flex-end;
}

.welcome-user {
    font-size: 1.5rem;
    align-self: flex-start;
}

.header-buttons {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 2rem;
}

.header-button {
    cursor: pointer;
    background-color: coral;
    color: white;
    border: none;
    width: 6rem;
    height: 2rem;
    font-size: 1rem;
    border-radius: 30px;
}
/*========================================*/
/* Main */
.main-content {
    grid-row: 2;
    grid-column: 2;
    background-color: rgb(216, 213, 213);

    display: grid;
    grid-template-columns: 3fr 1fr;
    padding: 20px;
    gap: 1rem;
}

/* Project Section */
.project-section {
    grid-column: 1;
    grid-row: 1 / 3;
}

.project-section h2 {
    margin-left: 5px;
    margin-bottom: 1rem;
}

.project-cards {
    display: grid;
    flex-wrap: wrap;
    gap: 2rem 1rem;
    
    grid-template-rows: auto 1fr 1fr;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    grid-auto-rows: 1fr;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    
    gap: 10px;
    background: linear-gradient(to left, white 97%, orange 3%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
}

.project-card > a {
    font-size: 1.3rem;
}

.center-project {
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-project > img {
    height: 200px;
    width: 100%;
    max-width: 350px;
}

.project-card a {
    text-decoration: none;
    color: black;
    font-weight: 600;
}

.project-buttons {
    align-self: flex-end;
}

.project-button:hover {
    filter: invert(51%) sepia(78%) saturate(2548%) hue-rotate(190deg) brightness(101%) contrast(100%);
}

/* Side Content Section */
.side-content {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
}

.todo-section, .resource-section {
    display: flex;
    flex-direction: column;
}

.border {
    width: 100%;
    height: 1px;
    background-color: lightgray;
}

.tasks, .resources {
    margin-top: 1rem;
    background-color: white;
    border-radius: 10px;
    padding: 1rem 2rem;
    /* Stretches content to bottom of screen */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
}

.task, .resource {
    padding: 10px;
}

.task {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.resource a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

.resource > a {
    font-size: 1.2rem;
}

/* Custom Checkbox for Tasks */
input[type="checkbox"] {
    appearance: none;
    position: relative;
    width: 25px;
    height: 25px;
    border: 2px solid black;
    /* Adjusts the position of the checkboxes on the text baseline */
    vertical-align: -2px;
}

input[type="checkbox"]::before {
    content: "✔️";
    position: absolute;
    font-size: 1.3rem;
    right: -4px;
    top: -.2em;
    visibility: hidden;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

input[type="checkbox"]:checked::before {
    visibility: visible;
}

input[type="checkbox"]:hover {
    background-color: #ccc;
}

input[type="checkbox"]:disabled {
    background: var(--primary-color);
}