@import url('https://fonts.googleapis.com/css2?family=Scope+One&display=swap');

:root {
  --card-black: #000000;
  --card-orange: #E69F00;
  --card-light-blue: #56B4E9;
  --card-green: #009E73;
  --card-yellow: #F0E442;
  --card-dark-blue: #0072B2;  
  --card-dark-orange: #D55E00;
  --card-pink: #CC79A7;
  --button-text-color: rgb(39, 39, 249);
}

.post-card--black .post-card__link {
  background-color: var(--card-black);
}

.post-card--orange .post-card__link {
  background-color: var(--card-orange);
}

.post-card--light-blue .post-card__link {
  background-color: var(--card-light-blue);
}

.post-card--green .post-card__link {
  background-color: var(--card-green);
}

.post-card--yellow .post-card__link {
  background-color: var(--card-yellow);
}

.post-card--dark-blue .post-card__link {
  background-color: var(--card-dark-blue);
}

.post-card--dark-orange .post-card__link {
  background-color: var(--card-dark-orange);
}

.post-card--pink .post-card__link {
  background-color: var(--card-pink);
}

html {
  margin: 0;
  padding: 1rem;
}

/* Dark theme styles applied when the data-theme attribute is "dark" */
[data-theme="dark"] {
  --bg-color: #202020;
  --text-color: #ededed;
  --btn-bg: #c1c1c1;
  --btn-text: #000000;
  --link-color: #f5f5f5;
  --btn-background: #030202;
}

[data-theme="light"] {
  --bg-color: #fcfcfc;
  --text-color: #000000;
  --link-color: rgb(42, 42, 238);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s; /* Smooth transition */
  font-family: "Scope One", serif;
  width: min(1200px, 100%);
  margin: auto;
  font-synthesis: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
}

strong,
b {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
}

button {
  cursor: pointer;
  a {
    background-color: transparent;
    color: var(--button-text-color);
  }
}

.home-intro {
  margin: 5rem 0 4rem;
}

.home-intro h1 {
  /* max-width: 850px; */
  margin: 0;
  font-family: "Space Grotest", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.home-intro__meaning {
  display: block;
  margin-top: 0.15rem;
  /* font-family: "Source Code Pro", monospace; */
  font-size: 0.9rem;
  line-height: 1.2;
}
.home-intro p {
  /* max-width: 600px; */
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

ul li {
  list-style: none;
}


main {
  min-height: 60vh;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#site-name {
  font-size: 1.2rem;
}

section h2{
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

#post-title {
  text-decoration: underline;
  color: var(--text-color);
}

p, button, a, time {
  /* font-family: "Source Code Pro", monospace; */
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

p {
  line-height: 1.8rem;
}

footer {
  border-top: 1px solid var(--text-color);
  margin-top: 5rem;
}

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

a {
  background-color: var(--link-background);
}

li a, h2 a {
  background-color: transparent;
}
nav {
  margin: none;
  padding: 0 5px;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

nav ul {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  overflow-x: scroll;
  padding-left: 0;
}

nav ul li {
  list-style: none;
  padding-right: 20px;
}



#share-icon {
  font-size: 1.2rem;
  text-align: right;
}

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

.post-header-share {
  position: sticky;
  top: 0px;
  background-color: var(--bg-color);
  z-index: 100;
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
}

.shareButton {
  display: none;
}

.socialButtons, .socialButtons ul {
  margin: 0.25rem 0; 
  align-items: center;
}
.socialButtons span {
  color: var(--text-color);
}
.socialButtons ul li {
  list-style: none; 
  margin: 0;
}
.socialButtons ul li a {
  margin: 0 0.5rem; 
  display: block;
}
.socialButtons ul li:first-child a {
  margin: 0 0.2rem 0 0.5rem;
}
.socialButtons ul li a svg {
  width: auto; 
  height: 1.1rem; 
  display: block;
}
.will-change {
  transition: 250ms;
} 

/* Homepage post grid */

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.post-card {
  aspect-ratio: 1 / 1.2;
  overflow: hidden;
}

.post-card__link {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 1.4rem;
  color: #111;
  text-decoration: none;
  background-color: rgb(240, 235, 235);
  border-color: rgb(18, 18, 18);
  border-width: 1px;
  border-style: solid;

}

.post-card__link--image {
  position: relative;
  background-image: 
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.55)
    ),
    var(--card-image);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.post-card__date {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.03;
  text-transform: uppercase;
}

.post-card__content {
  margin-top: auto;
}

.post-card__title {
  margin: 0;
  font-family: "Space Grotest", sans-serif;
  /* font-size: clamp(1.15rem, 1.7vw, 1.6rem); */
  font-weight: 400;
  line-height: 1.2;
}

.post-card__description {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.2rem;
}

.post-content {
  max-width: 768px;
  margin-inline: auto;
}

/* Images within blog posts */
.post-content img {
    display: block;
    max-width: min(100%, 680px);
    height: auto;
    margin: 2rem auto;
    border-radius: 6px;
}

/* Tablet */

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 520px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}


