

@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap");

/* =====================================
   GLOBAL
===================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #070707;
  color: #f2f2ef;
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

/* =====================================
   HEADER
===================================== */

.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  color: #f2f2ef;
}

.main-nav a {
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #999;
  transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #fff;
}

/* =====================================
   PAGE LAYOUT
===================================== */

.blog-home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 55px 24px 100px;
}

/* =====================================
   INTRODUCTION
===================================== */

.home-hero {
  max-width: 850px;
  margin-bottom: 78px;
}

.home-hero h1 {
  margin: 0;

  color: #f4f3ef;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 68px;
  font-weight: 400;
  line-height: .98;
  letter-spacing: -1.8px;
}

.home-hero-text {
  max-width: 650px;
  margin: 28px 0 0;

  color: #999;
  font-size: 19px;
  line-height: 1.55;
}

/* =====================================
   CATEGORY FILTERS
===================================== */

.category-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-top: 36px;
}

.filter-button {
  padding: 9px 16px;
  border: 1px solid #292929;
  border-radius: 999px;

  background: transparent;
  color: #888;

  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;

  cursor: pointer;
  transition:
    color .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.filter-button:hover {
  border-color: #555;
  color: #ddd;
}

.filter-button.active {
  background: #111;
  border-color: #8b9bab;
  color: #fff;
}

.filter-button:focus-visible {
  outline: 2px solid #8b9bab;
  outline-offset: 3px;
}

/* =====================================
   SECTION HEADINGS
===================================== */

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.home-section-title h2,
.home-latest h2 {
  margin: 0;

  color: #f3f3f0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 43px;
  font-weight: 400;
  line-height: 1;
}

/* =====================================
   FEATURED ARTICLE GRID
===================================== */

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.home-card {
  min-width: 0;

  background: #101010;
  border: 1px solid #252525;
  border-radius: 6px;
  overflow: hidden;

  transition:
    transform .2s ease,
    border-color .2s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  border-color: #444;
}

.home-card a,
.home-card-static {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-card-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #deded8;
}

.home-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;

  background: linear-gradient(135deg, #d8d5cc, #aebfba);
  color: #555;

  font-size: 10px;
  letter-spacing: 2px;
  text-align: center;
}

.home-card-content {
  flex-grow: 1;
  padding: 22px;
}

.essay-category {
  margin: 0 0 9px;
  color: #82a6ca;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.home-card-content h3 {
  margin: 0 0 10px;

  color: #f2f2ef;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.3px;
}

.home-card-content p:not(.essay-category) {
  margin: 0;
  color: #999;
  font-size: 15px;
  line-height: 1.55;
}

.filter-empty {
  margin: 24px 0;
  color: #999;
  font-size: 15px;
}

/* =====================================
   LATEST WRITING
===================================== */

.home-latest {
  margin-top: 85px;
}

.home-latest h2 {
  margin-bottom: 26px;
}

.latest-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;

  padding: 29px 0;
  border-top: 1px solid #252525;

  transition: opacity .2s ease;
}

.latest-item:last-child {
  border-bottom: 1px solid #252525;
}

.latest-item:hover {
  opacity: .7;
}

.latest-number {
  color: #696969;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 46px;
  line-height: 1;
}

.latest-content h3 {
  margin: 0 0 6px;

  color: #f1f1ee;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.2;
}

.latest-content p {
  max-width: 800px;
  margin: 0;

  color: #888;
  font-size: 15px;
  line-height: 1.55;
}

/* =====================================
   TABLET
===================================== */

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

  .home-hero h1 {
    font-size: 58px;
  }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 650px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 12px;
  }

  .blog-home {
    padding: 42px 20px 80px;
  }

  .home-hero {
    margin-bottom: 55px;
  }

  .home-hero h1 {
    font-size: 45px;
    line-height: 1;
  }

  .home-hero-text {
    font-size: 17px;
  }

  .category-filter {
    gap: 8px;
  }

  .filter-button {
    padding: 9px 13px;
    font-size: 11px;
  }

  .home-card-grid {
    grid-template-columns: 1fr;
  }

  .home-section-title h2,
  .home-latest h2 {
    font-size: 35px;
  }

  .latest-item {
    grid-template-columns: 52px 1fr;
  }

  .latest-number {
    font-size: 35px;
  }
}

@media (max-width: 420px) {
  .home-hero h1 {
    font-size: clamp(34px, 10vw, 45px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
