/* === FONTS === */

/* rubik-300 - latin */
@font-face {
  font-family: 'Rubik';
  src: url('assets/fonts/rubik-v31-latin-300.woff2') format('woff2'); 
  font-weight: 300;
  font-style: normal;
  font-display: swap; 
}
/* rubik-regular - latin */
@font-face {
  font-family: 'Rubik';
  src: url('assets/fonts/rubik-v31-latin-regular.woff2') format('woff2'); 
  font-weight: 400;
  font-style: normal;
  font-display: swap; 
}
/* rubik-500 - latin */
@font-face {
  font-family: 'Rubik';
  src: url('assets/fonts/rubik-v31-latin-500.woff2') format('woff2'); 
  font-weight: 500;
  font-style: normal;
  font-display: swap; 
}

/* === CSS RESET === */

/* Box sizing rules */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements */
ul, ol {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* === CSS CUSTOM PROPERTIES === */

:root {
  /* === Color Pallette === */

  /* Primary Colors */
  --clr-blue-300: hsl(195, 74%, 62%);
  --clr-orange-300: hsl(15, 100%, 70%);
  --clr-yellow-300: hsl(43, 84%, 65%);
  --clr-green-400: hsl(145, 58%, 55%);
  --clr-pink-400: hsl(348, 100%, 68%);
  --clr-purple-600: hsl(246, 80%, 60%);
  --clr-purple-700: hsl(264, 64%, 52%);

  /* Neutral Colors */
  --clr-alice-blue: hsl(208, 100%, 97%);
  --clr-navy-200: hsl(236, 100%, 87%);
  --clr-navy-900: hsl(235, 46%, 20%);
  --clr-navy-925: hsl(235, 47%, 32%);
  --clr-navy-950: hsl(226, 43%, 10%);
  --clr-purple-500: hsl(235, 45%, 61%);
  --clr-white: hsl(0, 0%, 100%);

  /* === Typography === */

  /* font family */
  --ff-body: 'Rubik', sans-serif;

  /* font size */
  --fs-body: 0.875rem;
  --fs-card-titles: 1.125rem;

  /* font weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-bold: 500;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xlg: 2.5rem;
  --space-xxlg: 3rem;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  background: var(--clr-navy-950);
  line-height: 1.5;
}

.main__card--container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

.main__profile--card {
  margin-block-end: 4rem;
}

.main__profile--background {
  width: 17rem;
  height: 12rem;
  border-radius: 0.8rem;
  background: var(--clr-navy-900);
}

.timeframes--container {
  display: flex;
  justify-content: space-around;
 
  transform: translateY(9.3rem);
  color: var(--clr-purple-500);
  font-size: 1rem;
}

.timeframe--btn {
  all: unset;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
  outline: none;
}

.timeframe--btn:hover {
  color: var(--clr-white);
}

.timeframe--btn:focus {
  outline: none;
}

.active {
  color: var(--clr-white);
}

.main__profile--foreground{
  width: 17rem;
  height: 8rem;
  border-radius: 0.8rem;
  background: var(--clr-purple-600);
  margin-block-start: -12rem;
  display: grid;
  place-items: center;
}

.main__participant--profile {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2vw, 2rem);
}

.participant--image {
  width: 3rem;
  height: 3rem;
  box-shadow: 0 0 0 2px var(--clr-white);
  border-radius: 50%;
}

.dashboard--description {
  line-height: 1.3;
}

.dashboard--description .text {
  font-size: clamp(0.95rem, 4vw, 1.2rem);
  color: var(--clr-navy-200);
}

.dashboard--description .participant--name {
  color: var(--clr-white);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: var(--fw-regular);
}

.cards {
  width: clamp(18rem, 80vw, 35rem);
}

.background {
  height: 9rem;
  border-radius: 1rem;
  display: flex;
  justify-content: end;
  z-index: 1;
  overflow: hidden;
}

.icons {
  width: 5rem;
  height: 5rem;
  margin-inline-end: 0.9rem;
  margin-block-start: -0.3rem;
}

.foreground {
  height: 7rem;
  background-color: var(--clr-navy-900);
  border-radius: 0.8rem;
  margin-block-start: -6rem;
  position: relative;
  z-index: 1000;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-sizing: border-box;
}

.foreground:hover {
  background-color: var(--clr-navy-925);
}

.foreground:has(.ellipsis--icon:hover) {
  background-color: var(--clr-navy-900);
}

.title--block, .duration {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title {
  color: aliceblue;
  font-weight: var(--fw-bold);
  white-space: nowrap;
  line-height: 1;
  align-self: flex-start;
}

.ellipsis--icon {
  all: unset;
  cursor: pointer;
  margin: 0 0.5rem;
}

.ellipsis--icon path{
  fill: var(--clr-navy-200);
  transition: fill 0.3s ease;
}

.ellipsis--icon:hover path{
  fill: var(--clr-white);
}

.current--time {
  color: var(--clr-alice-blue);
  font-size: 1.8rem;
  font-weight: var(--fw-light);
}

.previous--time {
  color: var(--clr-navy-200);
}

.orange300 {
  background: var(--clr-orange-300);
}

.blue300 {
  background: var(--clr-blue-300);
}

.pink400 {
  background: var(--clr-pink-400);
}

.green400 {
  background: var(--clr-green-400);
}

.purple700 {
  background: var(--clr-purple-700);
}

.yellow300 {
  background: var(--clr-yellow-300);
}

@media (min-width: 23.5rem) and (max-width:52.49rem) {
  .main__card--container {
    background-color: var(--clr-white);
    width: 90%;
    padding: clamp(2rem, 2.5vw, 2.5rem);
    border-radius: var(--space-md);
  }
}

@media screen and (min-width: 52.5rem) {

  .main__card--container {
    width: 90vw;
    display: grid;
    place-items: center;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: -3rem 2rem;
  }

  .cards {
    max-width: 40vw;
    margin-block-end: -7rem;
  }

  .main__profile--card {
    grid-area: 1 / 1 / 2 / 3;
    margin-block-start: 2rem;
    margin-block-end: 5rem;
  }

  .main__profile--background, .main__profile--foreground {
    min-width: clamp(46rem, 87vw, 70rem);
  }

  .main__profile--background {
    height: 15rem;
    margin-block-end: 1rem;
  }

  .main__profile--foreground {
    height: 10rem;
    transform: translateY(-5rem);
    padding: 2rem;
  }

  .participant--image {
    width: 5rem;
    height: 5rem;
    margin-inline-end: 2rem;
  }

  .timeframes--container, .duration {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .timeframes--container {
    flex-direction: row;
    font-size: 1.8rem;
    transform: translateY(11rem);
  }

  .timeframe--btn {
    max-width: 6rem;
  }

  .foreground {
    height: 9rem;
  }
}

@media screen and (min-width: 63rem) {
  .main__card--container {
    height: 30rem;
    width: 90vw;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    overflow: hidden;
    gap: 0 1rem;
  }

  .main__profile--card {
    grid-area: 1 / 1 / 3 / 2;
    margin-block-start: 8rem;
    margin-block-end: 0;
  }

  .main__profile--background, .main__profile--foreground {
    min-width: clamp(13rem, 20vw, 23rem);
  }

  .main__profile--background {
    height: 28rem; 
    margin-block-end: 0;
  }

  .main__profile--foreground {
    height: 20rem;
    transform: translateY(-16rem);
    padding: 1.5rem;
  }

  .main__participant--profile {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeframes--container {
    font-size: 1rem;
    flex-direction: column;
    transform: translateY(21.5rem);
    margin-inline-start: 1rem;
    gap: 0.5rem;
  }

  .timeframe--btn {
    max-width: 6rem;
  }

  .cards {
    width: clamp(13rem, 20vw, 23rem);
    margin-block-end: 0;
  }

  .foreground {
    height: 10rem;
    gap: 1.5rem;
  }

  .title {
    font-size: 1.3rem;
  }

  .duration {
    gap: 0.5rem;
  }

  .participant--image {
    margin-block-end: 0.7rem;
  }

  .dashboard--description .text {
    margin-block-end: 0.8rem;
  }
  
}


