:root {
  --fs-300: 0.9375rem;
  --fs-400: 1.0625rem;
  --fs-500: 1.375rem;
  --fs-600: 1.875rem;
  --fs-700: 2rem;
  --ff-body: "Roboto", sans-serif;
  --ff-heading: "Playfair Display", serif;
  --fw-400: 400;
  --fw-700: 700;
  --fw-900: 900;
  --clr-primary-200: hsla(193, 90%, 92%, 0.925);
  --clr-primary-300: hsl(184, 100%, 39%);
  --clr-primary-400: hsl(192, 100%, 26%);
  --clr-primary-500: hsla(202, 100%, 42%, 0.795);
  --clr-neutral-100: hsla(0, 0%, 100%, 1);
  --clr-neutral-300: hsla(0, 0%, 50%, 1);
  --clr-neutral-400: hsla(0, 0%, 40%, 1);
  --clr-neutral-500: hsla(0, 0%, 60%, 1);
  --clr-neutral-900: hsla(0, 0%, 10%, 1);
}

@media (min-width: 35em) {
  :root {
    --fs-300: 1rem;
    --fs-400: 1.125rem;
    --fs-500: 1.5rem;
    --fs-600: 2.25rem;
    --fs-700: 3rem;
  }
}

/* //////////////////////
  RESET - source: https://piccalil.li/blog/a-modern-css-reset
  /////////////////////// */

/* Box sizing rules */

*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margin */

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */

ul:where([role="list"]), ol:where([role="list"]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Set core root defaults */

html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */

a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */

img, picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */

input, button, textarea, select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* //////////////////////
  General styling
  /////////////////////// */

body {
  font-family: var(--ff-body);
  font-size: var(--fs-400);
  color: var(--clr-neutral-900);
}

h1, h2, h3 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-900);
  line-height: 1.1;
}

strong {
  font-weight: var(--fw-700);
}

section, .section {
  padding: min(10vh, 10em) 0;
}

.logo {
  width: 8rem;
}

/* //////////////////////
  Utility Classes
  /////////////////////// */

/* select all direct childen of .flow
   and add margin to the top for proper
   spacing */

.flow>*:where(:not(:first-child)) {
  margin-top: var(--flow-spacer, 1em);
}

.container {
  margin-inline: auto;
  padding-inline: 1.5em;
  max-width: 72rem;
}

.container--narrow {
  max-width: 65rem;
}

.flex-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap, 1em);
}

.text-center {
  text-align: center;
}

/* typgraphy */

.article-title, .section-title {
  color: var(--clr-primary-500);
}

.article-title {
  font-size: var(--fs-700);
}

.section-title {
  font-size: var(--fs-600);
}

/* //////////////////////
  Header
  /////////////////////// */

.page-header {
  padding: 1em 0;
}

.page-header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-list {
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--clr-neutral-900);
  text-decoration: none;
}

.nav-list a:focus, .nav-list a:hover {
  color: var(--clr-primary-400);
  text-decoration: underline;
}

/* //////////////////////
  Footer
  /////////////////////// */

.site-footer {
  --logo-color: currentColor;
  padding: 0.5em 0;
  color: var(--clr-neutral-100);
  background-color: var(--clr-primary-500);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  font-size: 0.7em;
}

/* //////////////////////
  Homepage
  /////////////////////// */

.hero>div {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: 1fr;
  align-items: center;
  gap: 3em;
}

.hero__image {
  width: 100%;
  /* max-height: max(15rem, 40vh); */
  object-fit: cover;
}

@media (min-width: 45em) {
  .hero>div {
    grid-auto-flow: column;
  }
}

.featured-articles, .all-articles {
  background-color: var(--clr-primary-200);
  position: relative;
}

.featured-articles ul, .all-articles ul {
  display: none;
  opacity: 0;
}

.all-articles {
  background-color: #fff;
}

.articles__list {
  --flow-spacer: 3rem;
  margin: 6rem 0;
}

/* //////////////////////
  Individual article page
  /////////////////////// */

.next, .nextAll {
  position: absolute;
  top: 50%;
  right: 50px;
  font-size: 2em;
  cursor: pointer;
  color: #55555550;
  z-index: 100;
}

.prev, .prevAll {
  position: absolute;
  top: 50%;
  left: 50px;
  font-size: 2em;
  cursor: pointer;
  color: #55555550;
  z-index: 100;
}

.next:hover, .prev:hover, .nextAll:hover, .prevAll:hover {
  filter: brightness(0.5);
}

.slider-wrapper {
  height: 400px;
  padding: 0.5em 0.3em;
}

.slide {
  /* display: inline-block; */
  width: 35%;
  height: 100% !important;
  padding: 10px;
  margin: 0px 10px 0px 10px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.main-article {
  margin-bottom: 3rem;
}

.main-article__figure figcaption {
  margin: 1rem 0;
  font-size: var(--fs-300);
  opacity: .9;
}

/* //////////////////////
  Article snippets
  /////////////////////// */

.snippet {
  display: grid;
  gap: 1em;
  grid-template-areas: "image" "title" "meta" "body" "button";
}

.snippet__image {
  grid-area: image;
  width: 80%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.snippet__title {
  grid-area: title;
}

.snippet__meta {
  grid-area: meta;
  color: var(--clr-neutral-300);
}

.snippet__meta span {
  color: var(--clr-neutral-900);
}

.snippet .btn {
  grid-area: button;
}

.snippet__title {
  color: var(--clr-neutral-900);
  font-size: var(--fs-500);
}

.snippet__title a {
  color: inherit;
  text-decoration: none;
}

.snippet__title a:hover, .snippet__title a:focus {
  color: var(--clr-primary-500);
}

.snippet__body {
  font-size: 0.7em;
  width: 100%;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.btn {
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  padding: 0.75em 1.75em;
  border-radius: 0.25em;
  align-self: start;
  justify-self: start;
}

.btn:focus {
  outline: 0.125em solid var(--clr-primary-400);
  outline-offset: 0.25em;
}

.btn--primary {
  background: var(--clr-primary-400);
  color: var(--clr-neutral-100);
  font-weight: var(--fw-700);
  border: 2px solid var(--clr-primary-400);
}

.btn--primary:hover, .btn--primary:focus {
  background: var(--clr-primary-500);
  border-color: var(--clr-primary-500);
}

.btn--neutral {
  background-color: var(--clr-neutral-100);
  color: var(--clr-neutral-900);
  font-weight: var(--fw-700);
  border: 2px solid var(--clr-neutral-900);
}

.btn--neutral:hover, .btn--neutral:focus {
  color: var(--clr-neutral-100);
  background-color: var(--clr-neutral-900);
}


.blogPost{
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 15px;
}
.blogPost .blogPost__image{
  flex: 0.3;
  width: 100%;
  height: 300px;
}
.blogPost .blogPost__content{
  flex: 0.7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-evenly;
  height: 300px;
  margin-left: 20px;
}
.blogPost .blogPost__content .blogPost__title a {
  text-decoration: none;
  color: var(--clr-primary-500);
  font-size: var(--fs-500);
}
.blogPost__meta, .snippet__meta {
  color: #aaaaaa;
  font-size: 12px;
}

@media (max-width: 768px) {
  .blogPost{
    width: 100%;
    flex-direction: column;
  }
  .blogPost .blogPost__content{
    margin-top: 20px;
    margin-left: 0;
  }
  .next, .prev, .nextAll, .prevAll {
    display: none;
    opacity: 0;
  }
}