@import url('fonts.css');


/* ---- CSS RESET ---- */
*, *::before, *::after {
    box-sizing: border-box;
}
* {
    margin: 0;
}
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
input, button, textarea, select {
    font: inherit;
    font-size: 100%;
}
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
#root, #__next {
    isolation: isolate;
}


/* ---- COLOR VARIABLES ---- */
:root {
    --primary-blue: #588cd5;
    --primary-grey: #778d97;
    --primary-grey-transparent-A: #bec6c993;
    --primary-grey-transparent-B: #bec6c9c4;
    --primary-grey-light: #c5d0db;
    --primary-grey-dark: #47525c;
    --dark-blue: #1c2b34;
}


/* ---- BASE & GENERAL STYLES ---- */
body {
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: "museo_slab", serif;
    font-size: 16px;
    color: var(--dark-blue);
    background-image: url('../images/alaska-2.jpeg');
    background-size: cover;
    overflow: hidden;
}
ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    padding: 0.2em 1.5em;
    border: 1px solid var(--dark-blue);
    border-radius: 16px;
    color: var(--dark-blue);
    background-color: transparent;
    font-size: 0.8em;
    transition: 250ms;
    cursor: pointer;
}
button:hover {
    color: white;
    background-color: var(--dark-blue);
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.196);
    transform: scale(1.1);
}
button:active {
    color: var(--primary-grey-light);
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.444);
    transform: scale(0.95);
}

.hidden {
    visibility: hidden;
}

/* Hide all scroll bars */
.project-grid::-webkit-scrollbar,
.project-grid::-webkit-scrollbar-thumb,
.project-grid::-webkit-scrollbar-track,
.my-projects::-webkit-scrollbar,
.my-projects::-webkit-scrollbar-thumb,
.my-projects::-webkit-scrollbar-track,
.updates-container::-webkit-scrollbar,
.updates-container::-webkit-scrollbar-thumb,
.updates-container::-webkit-scrollbar-track,
.trending-container::-webkit-scrollbar,
.trending-container::-webkit-scrollbar-thumb,
.trending-container::-webkit-scrollbar-track {
    display: none;
}


/* ---- PAGE LAYOUT ---- */
.page-container {
    height: 100vh;
    display: flex;
    gap: 1em;
}

/* Sidebar - Main */
.sidebar {
    height: 100%;
    width: 275px; /* fixed unit */
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3em;
}
.nav>li {
    display: flex;
    align-items: center;
    gap: 1.3em;
}
.nav>.current-page {
    font-weight: bold;
    gap: 3em;
}
.communities-li {
    gap: 1.1em !important;
}
.current-page::after {
    content: "<-";
}
.sidebar * {
    color: var(--dark-blue);
}
.nav-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* Sidebar - Collapse */
.collapsed-sidebar {
    width: auto;
    gap: 1em;
}
.collapsed-logo {
    margin-left: 0;
    position: relative;
    right: 1.5em;
    transform: scale(0.5);
}
.collapsed-text {
    display: none;
}

/* Main Content */
.content {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 1em;
    overflow: hidden;
}

/* Top Toolbar */
.top-toolbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas: 
        "search search search links links"
        "greet greet greet buttons buttons";
    gap: 1em;
}
.search-div {
    grid-area: search;
}
.user-link-div {
    grid-area: links;
}
.welcome {
    grid-area: greet;
}
.action-buttons {
    grid-area: buttons;
}

/* Main Content - Project & Info Div */
.main-content {
    height: 100%;
    padding: 1em 0 1em 1em;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "projects projects projects info"
        "projects projects projects info";
    gap: 1em;
    overflow-y: auto;
}
.my-projects {
    grid-area: projects;
    overflow-y: auto;
}
.info-div {
    height: 100%;
    grid-area: info;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
    gap: 1em;
}
.info-div>div>h3 {
    text-align: center;
}
.updates-card,
.trending-card {
    height: 80%;
}
.updates>h3,
.trending>h3 {
    padding: 0;
}
.main-content div>h3 {
    /* full width h3 */
    grid-column: 1 / -1;
}
.project-grid {
    height: 100%;
    margin: 1em;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px; /* fixed unit */
    gap: 1em;
}
.project-grid .project-card {
    height: 100%;
    width: 100%;
}


/* ---- PAGE STYLING ---- */

/* SIDEBAR */
.logo-image {
    height: 60px; /* fixed unit */
    transition: 250ms;
}
.sidebar {
    padding: 1em;
    background-color: var(--primary-grey-transparent-B);
    box-shadow: 0 0 12 0 rgba(0, 0, 0, 0.167);
}
.nav-container {
    margin-left: 1em;
}
.nav > li {
    margin-bottom: 0.8em;
}
.nav > li > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5em;
}
.nav > li > a > * {
    transition: 250ms;
}
a > p {
    position: relative;
    top: 1px;
}
.hero-container {
    margin-left: 1em;
    margin-right: 0;
    align-self: flex-start;
    justify-self: center;
    cursor: pointer;
}
.attribution-nav {
    margin-top: auto;
    font-size: 12px;
}



/* TOP TOOLBAR */
/* Profile Pictures */
.profile-pic-div {
    border-radius: 50%;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: 250ms;
    cursor: pointer;
}
.profile-pic-div:hover {
    box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.25);
}
.profile-pic-div > img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}
.pd-sm {
    height: 40px;
    width: 40px;
}
.pd-sm:hover {
    height: 44px;
    width: 44px;
}
.pd-lg {
    height: 70px;
    width: 70px;
    margin-left: 1em;
}
.pd-lg:hover {
    height: 76px;
    width: 76px;
}

/* Search Bar */
.search-div {
    display: flex;
    gap: 0.5em;
}
.search-options {
    width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.search-icon {
    /* Google, StackOverflow, OpenAI */
    width: 24px;
    transition: 250ms;
    cursor: pointer;
}
.search-icon:hover {
    transform: scale(1.2);
}
form {
    width: 582px;
    padding: 1em 0 1em 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.search-bar {
    height: 45px; /* fixed unit */
    width: 100%;
    padding: 0px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid var(--primary-grey);
    border-radius: 50px;
    background-color: var(--primary-grey-light);
    opacity: 0.6;
    transition: 250ms;
}
.search-bar:hover {
    border: 1px solid var(--dark-blue);
    background-color: var(--primary-grey);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.167);
}
.search-bar:hover svg {
    stroke: var(--dark-blue) !important;
    fill: var(--dark-blue) !important;
}
.search-bar:hover .text-input::placeholder {
    color: var(--dark-blue);
}
.dark-text::placeholder {
    color: var(--dark-blue) !important;
}
.text-input {
    height: 100%;
    width: 100%; 
    padding: 0 10px;
    border: none;
    border-radius: 50px;
    color: var(--dark-blue);
    background-color: rgba(0, 0, 0, 0);
    font-size: 16px; /* prevent iOS zoom */
}
.text-input::placeholder {
    color: var(--primary-grey);
}
.text-input:focus {
    outline: none;
}
.search-glass {
    height: 20px;
    width: 20px;
    line-height: 20px;
    margin-left: 7px;
    stroke: var(--primary-grey);
    fill: var(--primary-grey);
}

/* User Info Section */
.bell-icon {
    height: 20px;
    width: 20px;
    line-height: 20px;
    fill: var(--dark-blue);
    transition: 150ms;
    cursor: pointer;
}
.bell-icon:hover {
    fill: var(--primary-grey);
}
.name-link {
    transition: 150ms;
    cursor: pointer;
}
.name-link:hover {
    color: var(--primary-grey-dark);
}

/* Welcome Section */
.welcome {
    display: flex;
    gap: 1em;
}

.welcome:nth-last-child(1) {
    display: flex;
    flex-direction: column;
}

/* User link div */
.user-link-div {
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1em;
}
.action-buttons {
    padding-right: 1em;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1em;
}


/* MAIN CONTENT */
/* Info Div */
.info-div {
    padding: 1em;
    margin-right: 1em;
    background-color: var(--primary-grey-transparent-A);
    border-radius: 16px;
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.167);
    overflow: hidden;
}

/* Project Cards */
.project-card {
    padding: 1em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1em;
    border-radius: 16px;
    background-color: var(--primary-grey-light);
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.167);
    overflow: hidden;
    transition: 250ms;
}
.project-card:hover {
    box-shadow: none;
}
.card-logo-img {
    height: 28px !important;
    width: 28px !important;
    border-radius: 0 !important;
}

.project-card-text-div {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.project-card-image-div {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(-100%);
    transition: transform 250ms ease-in-out;
    z-index: 1;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}
.project-card-header {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.project-card-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.project-card-title > div {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.project-card-title > p,
.project-card-header > p {
    font-size: 0.8em;
}
.project-card-title > p {
    max-height: 1.4em;
    line-height: auto;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding: 0 0.5em;
    border-radius: 4px;
    transition: 250ms;
}
.project-card-title > p:hover {
    transform: scale(1.05);
    cursor: pointer;
}
.project-card-actions {
    width: auto;
    padding: 0.2em 0.5em;
    align-self: flex-end;
    display: flex;
    justify-content: flex-end;
    gap: 0.5em;
    border-radius: 8px;
    transition: 250ms;
    z-index: 2;
}
.project-card-actions:hover {
    background: rgba(0, 0, 0, 0.285);
    transform: scale(1.05);
}
.project-card-actions svg {
    fill: var(--primary-grey);  
    transition: 250ms;
    cursor: pointer;
}
.project-card-actions svg:hover {
    fill: var(--primary-blue);
    transform: scale(1.1);
}

/* Updates & Trending Cards */
.updates-container {
    height: 33vh;
    overflow-y: auto;
}
.trending-container {
    height: 33vh;
    overflow-y: auto;
}
.updates-card,
.trending-card {
    height: auto;
    margin-top: 0.5em;
    padding: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    border-radius: 16px;
    background-color: var(--primary-grey-light);
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.167);
    font-size: 0.8em;
    overflow: hidden;
}
.updates-card {
    background-color: rgba(41, 56, 73, 0.709);
    color: var(--primary-grey-light);
}
.trending-card {
    background-color: rgba(33, 66, 104, 0.727);
    color: var(--primary-grey-light);
}



/* RESPONSIVE DESIGN */

/* Mobile Sidebar -- display when screen width < 800px */
.mobile-nav-container {
    display: none; /* changed to block in media query */
    height: auto;
    width: 100%;
    position: relative;
    top: 0;
    padding: 0.3em 0;
    color: var(--dark-blue);
    background-color: var(--primary-grey-transparent-A);
}
.mobile-nav {
    width: 100%;
    padding: 0 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style-type: none;
}
.mobile-nav>li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mobile-nav>li>p {
    line-height: 1.5;
    font-size: 2em;
}

@media screen and (max-width: 1200px) {
    .main-content {
        grid-template-columns: repeat(4, 1fr);
        grid-template-areas:
            "projects projects projects info info"
            "projects projects projects info info";
    }
    .updates-card>p,
    .trending-card>p {
        font-size: 0.6em;
    }
    .project-card-description {
        font-size: 0.8em;
    }
    
}

@media screen and (max-width: 800px) {
    body {
        font-size: 12px;
    }
    h2 {
        font-size: 1.2em;
    }
    .page-container {
        max-height: 100vh;
        padding-bottom: 2.5em;
    }
    .info-div {
        height: 100%;
        padding: 0.5em;
        display: flex;
        flex-direction: column;
        gap: 2em;
    }
    .info-div>* {
        max-height: 50%;
    }
    .info-div h3 {
        font-size: 1.2em;
    }
    .updates-container,
    .trending-container {
        max-height: 100%;
        display: grid;
        grid-auto-rows: max-content;
        gap: 0.5em;
        font-size: 1.5em;
        overflow: auto;
    }
    .name-link {
        font-size: 0.8em;
    }

    .search-bar {
        height: 26px;
    }
    .search-bar>svg {
        height: 20px;
        width: 20px;
    }
    .search-bar>input {
        padding: 0;
        font-size: 0.8em;
    }
    .search-options > div > svg {
        height: 20px;
        width: 20px;
    }
    .search-icon {
        width: 18px;
        height: 18px;
    }
    .pd-sm {
        height: 30px;
        width: 30px;
    }
    .pd-lg {
        height: 50px;
        width: 50px;
    }
    .pd-sm:hover {
        height: 32px;
        width: 32px;
    }
    .pd-lg:hover {
        height: 54px;
        width: 54px;
    }
    .mobile-nav-container {
        display: block;
    }
    .sidebar {
        display: none;
    }
    .project-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: max-content;
        gap: 2em;
    }

}

@media screen and (max-width: 600px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "projects"
            "info";
    }
    .info-div {
        margin: 1em;
        grid-template-rows: 1fr 1fr;
    }
    .updates-card,
    .trending-card {
        height: 100%;
        padding: 0.5em;
    }
    .search-icon {
        height: 14px;
        width: 14px;
    }
    .bell-icon {
        height: 14px;
        width: 14px;
    }
}

