@import url("josh-c-styles.css");

:root {
    --sidebar-padding: 1.5rem;
    --card-shadow: 
    1px 2px 2px hsla(0, 5%, 76%, 0.5),
    2px 4px 4px hsla(0, 5%, 76%, 0.5),
    4px 8px 8px hsla(0, 5%, 76%, 0.5);
    --icon-size--mid: 1.8rem;
}

* {
    box-sizing: border-box;
    font-family: "Ubuntu-Sans", sans-serif;
}

/* ===Base=== */

html, body {
    height: 100%;
}

.site-container {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(150px, 300px) auto;
    grid-template-rows: 1fr 6fr;
}

/* ===Header Section and contents=== */

.header {
    background: hsl(0, 0%, 100%);
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    box-shadow:
    1px 2px 2px hsla(0, 0%, 76%, 0.3),
    2px 4px 4px hsla(0, 0%, 76%, 0.3),
    4px 8px 8px hsla(0, 0%, 76%, 0.3);
    z-index: 11;

    display: grid;
    grid-template-rows: 2fr 3fr;
    grid-template-columns: minmax(1rem, 3rem) 3fr 2fr minmax(1rem, 3rem); 

    padding: 1rem 0;
}

/* --------Search group-------- */

.header__search-group {
    grid-row: 1/2;
    grid-column: 2/3;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1.5rem;
}

.header__search-group svg {
    width: var(--icon-size--mid);
    height: var(--icon-size--mid);
}

.header__search-group input {
    width: 90%;
    max-width: 40rem;
    height: 2rem;
    border-radius: 1rem;

    background-color: hsl(215, 27%, 91%);
    border-width: 0;
    padding: 0 1rem;
}

.header__search-group input:focus {
    border: 1px solid darkgrey;
    outline: 0px;
}

/* --------Profile group-------- */

.header__profile-group {
    grid-row: 1/2;
    grid-column: 3/4;

    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    align-items: center;
}

.header__profile-group svg {
    width: var(--icon-size--mid);
    height: var(--icon-size--mid);
    flex-shrink: 0;
}

.header__profile-group img{
    width: 80%;
    height: 80%;
    position: relative;
    bottom: 2px;
}

.header__profile-title {
    font-size: 1.5em;
    font-weight: bold;
}

/* --------Greeting group-------- */

.header__profile-greeting-group {
    grid-row: 2/3;
    grid-column: 2/3;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header__greeting-small {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: -4px;
}

.header__profile-greeting {
    font-weight: bold;
    font-size: 1.8rem;
}

/* --------Action group-------- */

.header__action-buttons {
    grid-row: 2/3;
    grid-column: 3/4;

    display: flex;
    gap: 1.5rem;

    align-items: center;
    justify-content: flex-end;

    padding-top: 10px;
}

.action-button {
    background-color: hsl(201, 79%, 46%);
    color: white;
    font-weight: bold;

    border-radius: 2rem;
    border: 0px;
    
    width: 6rem;
    height: 2.25rem;

    cursor: pointer;
}

.action-button:active {
    background-color: hsl(201, 73%, 40%);
    color: white;
    font-weight: bold;

    border-radius: 2rem;
    border: 0px;
    
    width: 6rem;
    height: 2.25rem;

    cursor: pointer;
}

/* ===Sidebar Section and contents=== */

.sidebar {
    background: hsl(201, 79%, 46%);
    grid-row: 1 / 3;
    grid-column: 1 / 2;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: min-content min-content min-content;
}

.sidebar__heading {
    padding-left: var(--sidebar-padding);
}

.sidebar__heading svg {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    display: inline;
    fill: white;
    vertical-align: middle;
}

.sidebar__heading h1 {
    color: white;
    vertical-align: middle;
    display: inline;
    font-size: 1.8rem;
}

.nav-section {
    display: grid;
    height: min-content;
    margin-top: 4rem;
}

.nav-section__link-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-grow: 0;
    padding: 0.4rem 0;
    padding-left: var(--sidebar-padding);

    user-select: none;
    cursor: pointer;
}

.nav-section__link-group:hover {
    background: #ffffff31;
}

.nav-section__link-group svg {
    fill: white;
    width: var(--icon-size--mid);
    height: var(--icon-size--mid);
    display: inline;
}

.nav-section__link-group p {
    color: white;
    display: inline;
    font-size: 1.5rem;
    font-weight: bold;
}

/* ===Main Section and contents=== */

.main-wrapper {
    display: flex;
    background: hsl(0, 100%, 98%);
    justify-content: center;
}

.main {
    flex-grow: 1;

    background: hsl(0, 100%, 98%);
    display: grid;

    grid-template-rows: 2.5rem 2.5rem 1fr;
    grid-template-columns: minmax(300px, 4fr) 25rem;

    max-width: 100rem;
    padding: 0 1rem;
}

.main__heading {
    grid-row: 2/3;
}

.project-section {
    grid-row: 3 / 4;
    grid-column: 1 / 2;

    display: grid;
    grid-auto-rows: 17rem;
    grid-template-columns: repeat(auto-fill, minmax(425px, 1fr));

    justify-content: center;
    align-items: start;

    gap: 1.8rem;

    max-width: 80rem;
}

.project__card {
    width: 100%;
    height: 100%;
    min-width: 300px;

    background-color: #ffffff;
    border-left-style: solid;
    border-left-color: hsl(38, 89%, 61%);
    border-left-width: 10px;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);

    display: grid;
    grid-template-rows: 2fr 1fr;

    padding: 2rem;
    cursor: pointer;

    transition: transform ease-in-out 50ms;
}

.project__card:hover {
    transform: scale(1.01) translate(-2px, -2px);
}

.project__card svg {
    width: var(--icon-size--mid);
    height: var(--icon-size--mid);
    display: inline;
    margin-left: 1rem;
    margin-right: 1rem;
    display: inline-block;
    pointer-events: none;
}

.project__icons {
    align-self: end;
    justify-self: end; 
}

/* ===Widget Sidebar=== */

.widget-sidebar {
    grid-row: 2 / 4;
    grid-column: 2 / 3;
    overflow: hidden;
    padding-left: 2rem;
    height: 100vh;
    padding-right: 0.5rem;
}

.widget-group {
    margin-bottom: 2rem;
}

.widget-group__heading {
    margin-left: 0;
    margin-bottom: .25rem;
}

.widget-card {
    background-color: #ffffff;
    height: min-content;
    width: 100%;
    box-shadow: var(--card-shadow), 
    -1px -2px 8px hsla(0, 5%, 76%, 0.25);
    border-radius: 0.5rem;
    padding: 2rem;
}

/*Get rid of the styling when using anchor tags to wrap text*/
.widget-card a,
.widget-card a:visited,
.widget-card a:hover,
.widget-card a:active {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* --------Announcements Widget-------- */

.announcement-wrapper {
    border-bottom: 2px solid lightgrey;
    margin-top: 1rem;
    padding-bottom: 1rem;
    height: 100%;
}

.announcement {
    height: min-content;
}

.announcement-wrapper:first-child {
    margin-top: 0;
}

.announcement-wrapper:last-child {
    padding-bottom: 0;
}

.announcement-wrapper:last-child {
    border-style: none;
}

.announcement p {
    color: grey;
    font-size: .75rem;
}

/* --------Trending Widget-------- */

.trending-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;

    margin-bottom: .5rem;
    width: 100%;
    height: 3lh;
}

.trending-item:last-child {
    margin-bottom: 0;
}

.trending-item__profile {
    font-size: 1.1rem;
}

.trending-item__profile-and-tagline {
    flex: 1; /*These two items allow the text in the tagline to be truncated if necessary*/
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.trending-item__tagline {
    font-size: 0.9rem;
    min-width: 0;
    flex-shrink: 0;
    color: grey;

/*Experimental to allow two lines, then truncation with ellipsis*/
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ===Utilities=== */

.flip {
    transform: scaleX(-1);
}

.rotate-90-counter-clockwise {
    transform: rotate(-90deg);
}

input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.icon-wrapper {
    --icon-size: 3.5rem;

    width: var(--icon-size);
    height: var(--icon-size);

    flex-shrink: 0;

    background-color: hsl(48, 88%, 60%);
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-wrapper--large {
    --icon-size: 5rem;

    width: var(--icon-size);
    height: var(--icon-size);

    flex-shrink: 0;
}

.sticky-wrap {
    position: sticky;
    top: 1rem;
    overflow: hidden;
    scrollbar-gutter: stable;
}

.sticky-wrap:hover {
    overflow: auto;
}

.increase-clickable-area--small {
    box-sizing: content-box;
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 0.25rem;
    margin: -0.25rem;
}

.increase-clickable-area--medium {
    box-sizing: content-box;
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 0.5rem;
    margin: -0.5rem;
}