:root {
  --color-primary: #06465a;
  --color-secondary: #10a4be;
  --color-secondary-light: #bae9f1;
  --color-accent-warm: #fce2d1;
  --color-accent-warm-hover: #f56e34;
  --color-white: #ffffff;
  --color-off-white: #f8f8f8;
  --color-grey-light: #eaeaea;
  --color-grey-mid: #9e9e9e;
  --color-black: #202020;
  --bg-blur: rgba(0, 0, 0, 0.4);
  --radius-btn: 0.2rem;
  --radius-card: 0.4rem;
}

/* css reset */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0 0 1.5rem;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html {
  line-height: 1.5;
  font-family: "Roboto Mono", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  margin: 0;
}

/* A elements that don't have a class get default styles */
a {
  text-decoration-skip-ink: auto;
  color: #36bf7f;
}

a:hover,
a:focus {
  color: #d96666;
}

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

svg {
  fill: currentColor;
}

svg:not(:root) {
  overflow: hidden;
}

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

/* Remove all animations and transitions 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;
  }
}

/* type scale */
/* breakpoint small - 1.125 (Major Second) */
h1 {
  font-size: 2.027rem;
  font-weight: 900;
}

h2 {
  font-size: 1.802rem;
  font-weight: 900;
}

h3 {
  font-size: 1.602rem;
  font-weight: 900;
}

h4 {
  font-size: 1.424rem;
  font-weight: 900;
}

h5 {
  font-size: 1.266rem;
  font-weight: 700;
}

h6 {
  font-size: 1.125rem;
  font-weight: 400;
}

p {
  font-size: 1rem;
  font-weight: 400;
}

a {
  font-weight: 400;
}

/* breakpoint medium - 1.2 (Minor Third) */
@media only screen and (min-width: 50rem) {
  h1 {
    font-size: 2.986rem;
  }

  h2 {
    font-size: 2.488rem;
  }

  h3 {
    font-size: 2.074rem;
  }

  h4 {
    font-size: 1.728rem;
  }

  h5 {
    font-size: 1.44rem;
  }

  h6 {
    font-size: 1.2rem;
  }
}

/* breakpoint large - 1.25 (Major Third) */
@media only screen and (min-width: 70rem) {
  h1 {
    font-size: 3.815rem;
  }

  h2 {
    font-size: 3.052rem;
  }

  h3 {
    font-size: 2.441rem;
  }

  h4 {
    font-size: 1.953rem;
  }

  h5 {
    font-size: 1.563rem;
  }

  h6 {
    font-size: 1.25rem;
  }
}

/* global style */
ul {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

p {
  color: var(--color-black);
}

a {
  text-decoration: none;
  color: var(--color-black);
}

a:is(:hover, :focus) {
  color: var(--color-secondary);
}

.btn {
  color: var(--color-off-white);
  background: var(--color-accent-warm-hover);
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  min-width: 15rem;
  text-align: center;
}

.btn:is(:hover, :focus) {
  background: var(--color-secondary);
  color: var(--color-off-white);
}

.container {
  width: min(70rem, 100%);
  margin: 0 auto;
  padding: 0 1rem;
}

/* nav style */
/* header */
header {
  background: var(--color-black);
}

header .container {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav__home {
  padding: 1rem 0;
  margin: 0 auto;
}

.nav__home:is(:hover, :focus) {
  opacity: 0.5;
}

.nav__home img {
  height: 2.5rem;
}

.nav__link a {
  color: var(--color-off-white);
}

.nav__link li {
  display: flex;
  text-align: center;
}

header .nav__link a {
  flex: 1;
  padding: 0.5rem 0;
}

header .nav__link a:is(:hover, :focus) {
  background: var(--color-secondary);
}

/* footer */
footer {
  background: var(--color-black);
  color: var(--color-off-white);
}

footer .container {
  padding: 0;
  display: flex;
  flex-direction: column;
}

footer ul {
  padding-bottom: 1rem;
}

footer .nav__link li {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

footer .nav__link a {
  flex: 1;
  padding: 0.5rem 0;
}

footer .nav__link a:is(:hover, :focus) {
  color: var(--color-secondary);
}

footer .nav__other {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: smaller;
  padding: 1.5rem 0;
  gap: 1rem;
  background: var(--color-primary);
}

footer .nav__other a {
  color: var(--color-off-white);
}

/* hero section */
.hero {
  height: 70vh;
  background: linear-gradient(to bottom, #0009, #0009),
    url("../images/hero-banner.jpg");
  background-position: center;
  background-size: cover;
  color: var(--color-off-white);
}

.hero .container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.btn__hero {
  background: var(--color-off-white);
  color: var(--color-black);
  font-weight: 700;
}

/* cards */
.card {
  background: var(--color-grey-light);
  padding: 4rem 0;
}

.card .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.card__wrapper {
  flex: 1;
  min-width: 20rem;
  background: var(--color-white);
  overflow: hidden;
  border: 0.1rem var(--color-grey-mid) solid;
  border-radius: var(--radius-card);
}

.card__icon {
  background: var(--color-primary);
  padding: 2rem 0;
}

.card__icon img {
  margin: 0 auto;
}

.card__text {
  padding: 3rem;
  text-align: center;
}

.card__text p {
  margin: 0;
}

/* card 2 */
.card-2 .card__icon {
  background: var(--color-accent-warm-hover);
}

/* card 3 */
.card-3 .card__icon {
  background: var(--color-black);
}

/* about */
.about {
  padding: 4rem 0;
}

.about .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.about__img {
  flex: 1;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.about__content {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* recent post */
.post {
  background: var(--color-grey-light);
  padding: 4rem 0;
}

.post h6,
.post p {
  margin: 0;
}

.post .container {
  text-align: center;
}

.post__group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0.1rem var(--color-grey-mid) solid;
  border-radius: var(--radius-card);
  background: var(--color-white);
  padding: 2rem 1rem;
  gap: 1.5rem;
}

.indicator {
  height: 0.2rem;
  width: 2rem;
  background: var(--color-secondary);
}

.post__title {
  font-weight: 500;
}

.post__author {
  font-size: small;
  font-style: italic;
  color: var(--color-accent-warm-hover);
}

/* hover effect */
.card__wrapper:is(:hover, :focus),
.post__preview:is(:hover, :focus) {
  transform: translateY(-0.5rem);
  transition: transform 0.2s ease-in-out;
}

/* -------- blog post page -------- */
.hero--blog {
  background: linear-gradient(to bottom, #0009, #0009),
    url("../images/blog-image-adventurers.jpg");
  background-position: center;
  background-size: cover;
}
.hero--blog a {
  color: var(--color-white);
  text-decoration: underline;
}

.hero--blog p {
  color: var(--color-white);
}

button {
  all: unset;
}

.tag-item {
  font-size: small;
  border: 0.075rem var(--color-white) solid;
  border-radius: var(--radius-btn);
  padding: 0.25rem 0.5rem;
}

/* article */
.article {
  padding: 4rem 0;
}

.article .container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.content-area {
  flex: 2;
}

.call-out {
  background: var(--color-secondary-light);
  border-radius: var(--radius-card);
  padding: 1rem 1.5rem;
  margin-top: 3rem;
}

.call-out p,
.call-out h5 {
  color: var(--color-primary);
}

.call-out .indicator {
  width: 2rem;
  height: 0.25rem;
  background: var(--color-secondary);
  margin-bottom: 2rem;
}

.article__content__title {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.article__content__subtitle {
  font-weight: 500;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 0.5rem var(--color-secondary) solid;
}

.article p > a {
  color: var(--color-accent-warm-hover);
}

.article__content__footer {
  margin-top: 6rem;
  margin-bottom: 0;
  padding: 1rem 0;
  border-top: 0.1rem var(--color-grey-mid) solid;
  font-size: 0.8rem;
}

/* related blog post */
.related-article {
  padding: 1.5rem 1rem;
  background: var(--color-accent-warm);
  border-radius: var(--radius-card);
}

.related-article h5 {
  margin-bottom: 4rem;
}

.related-article__title:is(:hover, :focus) {
  color: var(--color-accent-warm-hover);
}

.related-article__wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.related-article__link {
  border-top: 0.15rem var(--color-accent-warm-hover) solid;
  padding-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-article__link p {
  margin: 0;
}

.related-article__title {
  font-weight: 500;
}

.related-article__author {
  font-size: small;
  font-style: italic;
}

/* -------- breakpoint -------- */
/* -------- tablet -------- */
@media only screen and (min-width: 50rem) {
  /* header */
  .container {
    padding: 0 2rem;
  }

  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
  }

  .nav__home {
    padding: 0;
    margin: 0;
  }

  nav {
    display: flex;
  }

  header .nav__link {
    display: flex;
  }

  header .nav__link a {
    padding: 1.25rem 1.5rem;
  }

  /* footer */

  footer .container {
    flex-direction: row;
    justify-content: space-between;
    padding: 2.5rem 2rem;
  }

  footer ul {
    padding-bottom: 0;
    padding-left: 1rem;
    border-left: 0.1rem var(--color-secondary) solid;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  footer .nav__link li {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
  }

  footer .nav__link a {
    padding: 0;
  }

  footer .nav__other {
    align-items: flex-start;
    padding: 0;
    background: none;
    text-align: left;
  }

  /* hero section */
  .hero {
    height: 80vh;
  }

  .hero .container {
    justify-content: center;
    align-items: flex-start;
    text-align: left;
  }

  .hero h6 {
    max-width: 40rem;
  }

  /* about */
  .about .container {
    flex-direction: row;
    gap: 3rem;
  }

  .about__content {
    text-align: left;
    align-items: flex-start;
    gap: 1.5rem;
  }

  /* recent post */
  .post .container {
    text-align: left;
  }

  .post__group {
    flex-direction: row;
    gap: 1rem;
  }

  .post__preview {
    flex: 1;
    align-items: flex-start;
    gap: 1.5rem;
  }

  /* -------- blog post page -------- */
  .article .container {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
  }

  .related-article {
    flex: 1;
    padding: 3rem 2rem;
    position: sticky;
    top: 2rem;
  }
}
