/* =========================================
   DESIGN TOKENS
   ========================================= */

:root {
  --color-darkgrey: #15171a;
  --color-midgrey: #738a94;
  --color-lightgrey: #f1f1f1;
  --color-border: #e1e1e1;
  --color-secondary-text: #979797;
  --color-accent: #ff0095;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-mono: Menlo, Courier, monospace;
}

/* =========================================
   BASE
   ========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--color-darkgrey);
  background: #fff;
  margin: 0;
  padding: 0;
}

/* =========================================
   SITE HEADER / NAV
   ========================================= */

.gh-head {
  position: sticky;
  top: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 88px;
  padding: 0 clamp(1.6rem, 4vmin, 4rem);
  background-color: #fff;
  border-bottom: 1px solid var(--color-border);
}

.gh-head-logo a {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-darkgrey);
  text-decoration: none;
}

.gh-head-menu {
  display: flex;
  justify-content: center;
  gap: 3.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-head-menu a {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-darkgrey);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gh-head-menu a:hover {
  opacity: 1;
}

.gh-head-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.gh-head-btn-subscribe {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.8rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-darkgrey);
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.gh-head-btn-subscribe:hover {
  opacity: 0.85;
}

/* =========================================
   SITE HERO
   ========================================= */

.site-header {
  position: relative;
  overflow: hidden;
}

.site-header-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: clamp(6rem, 19vmin, 12rem) clamp(1.6rem, 4vmin, 4rem);
  text-align: center;
  color: #fff;
}

.site-header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(21, 23, 26, 0.65);
  z-index: 1;
}

.site-header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.site-header-title {
  font-size: clamp(3.4rem, 6vw, 7.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}

.site-header-description {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 400;
  margin: 0;
  opacity: 0.85;
  max-width: 60rem;
  line-height: 1.5;
}

/* =========================================
   POST FEED
   ========================================= */

.post-feed {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: max(3.2rem, 4.8vmin) max(2rem, 4vmin);
  padding: 0 clamp(1.6rem, 4vmin, 4rem);
  margin: max(3.2rem, 4.8vmin) auto 0;
  max-width: 1200px;
}

/* =========================================
   POST CARD — BASE
   ========================================= */

.post-card {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}

.post-card-image-link {
  display: block;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.post-card:not(.post-card-large) .post-card-image-link {
  height: 200px;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card-image-link:hover .post-card-image {
  transform: scale(1.02);
}

.post-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem 0 0;
}

.post-card-tags {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.post-card-featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card-primary-tag {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.2s;
}

.post-card-primary-tag:hover {
  opacity: 0.75;
}

.post-card-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0;
  color: var(--color-darkgrey);
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}

.post-card-title:hover {
  opacity: 0.75;
}

.post-card-excerpt {
  font-size: 1.5rem;
  line-height: 1.65;
  color: var(--color-midgrey);
  margin: 1rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.6rem;
}

.post-card-author-img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-card-byline {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.post-card-byline-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-darkgrey);
  text-decoration: none;
  transition: opacity 0.2s;
}

.post-card-byline-name:hover {
  opacity: 0.75;
}

.post-card-byline-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  color: var(--color-midgrey);
}

.post-card-byline-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

/* =========================================
   POST CARD — LARGE (FEATURED)
   ========================================= */

.post-card-large {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  overflow: hidden;
  border-radius: 6px;
  min-height: 380px;
}

.post-card-large .post-card-image-link {
  height: 100%;
  min-height: 380px;
  border-radius: 0;
}

.post-card-large .post-card-image {
  height: 100%;
  min-height: 380px;
}

.post-card-large .post-card-content {
  background: var(--color-darkgrey);
  padding: 4rem;
  justify-content: center;
  border-radius: 0;
}

.post-card-large .post-card-primary-tag {
  color: var(--color-accent);
}

.post-card-large .post-card-featured-label {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.post-card-large .post-card-title {
  font-size: clamp(2.6rem, 3.5vw, 4.4rem);
  color: #fff;
  margin-top: 0.8rem;
}

.post-card-large .post-card-title:hover {
  opacity: 0.8;
}

.post-card-large .post-card-excerpt {
  color: rgba(255, 255, 255, 0.6);
  -webkit-line-clamp: 4;
  margin-top: 1.4rem;
  font-size: 1.6rem;
}

.post-card-large .post-card-byline-name {
  color: rgba(255, 255, 255, 0.9);
}

.post-card-large .post-card-byline-meta {
  color: rgba(255, 255, 255, 0.45);
}

/* =========================================
   SITE FOOTER
   ========================================= */

.gh-foot {
  margin-top: max(8rem, 12vmin);
  background: var(--color-darkgrey);
  color: rgba(255, 255, 255, 0.45);
}

.gh-foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.2rem clamp(1.6rem, 4vmin, 4rem) 6rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.gh-foot-brand a {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.gh-foot-nav {
  display: flex;
  gap: 2.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-foot-nav a {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.gh-foot-nav a:hover {
  color: #fff;
}

.gh-foot-copyright {
  font-size: 1.3rem;
}

.gh-foot-copyright a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.gh-foot-copyright a:hover {
  color: #fff;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1000px) {
  .post-card-large {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .post-card-large .post-card-image-link,
  .post-card-large .post-card-image {
    min-height: 300px;
  }

  .post-card-large .post-card-content {
    padding: 3.2rem;
  }
}

@media (max-width: 767px) {
  .gh-head {
    height: auto;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding-top: 1.4rem;
    padding-bottom: 0;
    gap: 0;
  }

  .gh-head nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .gh-head-menu {
    display: flex;
    justify-content: flex-start;
    gap: 2.4rem;
    overflow-x: auto;
    padding: 1.2rem 0;
    margin-top: 0.8rem;
    border-top: 1px solid var(--color-border);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gh-head-menu::-webkit-scrollbar {
    display: none;
  }

  .gh-head-btn-subscribe {
    padding: 0.7rem 1.4rem;
    font-size: 1.3rem;
  }

  .post-feed {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }

  .post-card,
  .post-card-large {
    grid-column: 1 / -1;
  }

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

  .gh-foot-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.4rem;
  }
}

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

.article-header {
  padding: 4.8vmin clamp(1.6rem, 4vmin, 4rem) 0;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.article-tag {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.6rem;
  transition: opacity 0.2s;
}

.article-tag:hover {
  opacity: 0.75;
}

.article-title {
  font-size: clamp(3.2rem, 5vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 2.4rem;
  color: var(--color-darkgrey);
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding-bottom: 4.8vmin;
  border-bottom: 1px solid var(--color-border);
}

.article-author-img {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.article-byline-info {
  text-align: left;
}

.article-author-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-darkgrey);
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}

.article-author-name:hover {
  opacity: 0.75;
}

.article-meta {
  font-size: 1.3rem;
  color: var(--color-midgrey);
  margin-top: 0.2rem;
}

/* =========================================
   POST FEATURE IMAGE
   ========================================= */

.post-full-image {
  margin: 0 auto;
  max-width: 1200px;
  padding: 4vmin clamp(1.6rem, 4vmin, 4rem) 0;
}

.post-full-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* =========================================
   ARTICLE CONTENT TYPOGRAPHY
   ========================================= */

.gh-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 4vmin clamp(1.6rem, 4vmin, 4rem) 8vmin;
}

.gh-content p {
  font-size: 1.8rem;
  line-height: 1.75;
  margin: 0 0 2.8rem;
  color: var(--color-darkgrey);
}

.gh-content h2 {
  font-size: clamp(2.4rem, 3.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 5.6rem 0 1.6rem;
  color: var(--color-darkgrey);
}

.gh-content h3 {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 4.4rem 0 1.4rem;
  color: var(--color-darkgrey);
}

.gh-content ul,
.gh-content ol {
  font-size: 1.8rem;
  line-height: 1.75;
  margin: 0 0 2.8rem;
  padding-left: 2.8rem;
  color: var(--color-darkgrey);
}

.gh-content li {
  margin-bottom: 0.8rem;
}

.gh-content blockquote {
  margin: 3.2rem 0;
  padding: 0.4rem 0 0.4rem 2.4rem;
  border-left: 4px solid var(--color-accent);
  font-size: 2rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--color-darkgrey);
}

.gh-content a {
  color: var(--color-darkgrey);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.gh-content a:hover {
  color: var(--color-accent);
}

.gh-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 4rem 0;
}

.gh-content strong {
  font-weight: 700;
}

/* =========================================
   AUTHOR CARD
   ========================================= */

.author-card {
  border-top: 1px solid var(--color-border);
  max-width: 720px;
  margin: 0 auto;
  padding: 4vmin clamp(1.6rem, 4vmin, 4rem) max(6rem, 8vmin);
  display: flex;
  gap: 2.4rem;
  align-items: flex-start;
}

.author-card-img {
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-card-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-darkgrey);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
  transition: opacity 0.2s;
}

.author-card-name:hover {
  opacity: 0.75;
}

.author-card-bio {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--color-midgrey);
  margin: 0;
}

/* =========================================
   READ NEXT (RELATED POSTS)
   ========================================= */

.read-next {
  border-top: 1px solid var(--color-border);
  padding: 4.8vmin 0 0;
}

.read-next-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-midgrey);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin: 0 0 3.2rem;
}

.read-next-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: max(2.4rem, 4vmin) max(2rem, 4vmin);
  padding: 0 clamp(1.6rem, 4vmin, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.read-next-feed .post-card {
  grid-column: span 1;
}

@media (max-width: 900px) {
  .read-next-feed {
    grid-template-columns: repeat(2, 1fr);
  }

  .author-card {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .read-next-feed {
    grid-template-columns: 1fr;
  }

  .article-byline {
    flex-direction: column;
    text-align: center;
  }

  .article-byline-info {
    text-align: center;
  }
}

/* =========================================
   ARCHIVE HEADER (TAG & AUTHOR PAGES)
   ========================================= */

.archive-header {
  padding: max(4.8vmin, 3.2rem) clamp(1.6rem, 4vmin, 4rem)
    max(4vmin, 2.4rem);
  border-bottom: 1px solid var(--color-border);
}

.archive-header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.archive-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.8rem;
}

.archive-title {
  font-size: clamp(2.8rem, 4.5vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.8rem;
  color: var(--color-darkgrey);
}

.archive-description {
  font-size: 1.9rem;
  line-height: 1.55;
  color: var(--color-midgrey);
  margin: 0 0 0.8rem;
  max-width: 60rem;
}

.archive-meta {
  font-size: 1.4rem;
  color: var(--color-midgrey);
  margin: 0;
}

.archive-header-author .archive-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
}

.archive-header-author .archive-description {
  max-width: 50rem;
}

.archive-author-img {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2rem;
}
