/* ===== FONT FACES ===== */
@font-face { font-family: "PolySans Bulky"; src: url("../fonts/polysans-bulky.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PolySans Median"; src: url("../fonts/polysans-median.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonts/ppmori-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonts/ppmori-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("../fonts/ppmori-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragment-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background: #fffdf7;
  color: #1a1214;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.landing-page {
  background: #f5f0eb;
}

/* ===== LANDING PAGE HEADER ===== */
.landing-header {
  padding: 100px 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  max-width: 1400px;
  margin: 0 auto;
}
.landing-title {
  font-family: "PolySans Bulky", sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #1a1214;
  grid-column: 1;
  grid-row: 1;
}
.landing-tagline {
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #211718;
  padding-bottom: 12px;
  grid-column: 2;
  grid-row: 2;
  text-align: left;
  align-self: end;
}

/* ===== POSTS GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 20px;
  padding: 0 32px 80px;
  max-width: 1400px;
  margin: 0 auto;
}
.post-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.post-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 32px;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-img { transform: scale(1.02); }
.post-card-body { padding: 12px 0 0; }
.post-title {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: #1a1214;
  margin-bottom: 4px;
}
.post-date { font-size: 16px; color: rgba(145, 115, 118, 0.7); font-family: "PP Mori", sans-serif; font-weight: 600; }

/* ===== ARTICLE HERO ===== */
.article-hero-wrap {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: 60px;
}
.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-hero-overlay {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 64px);
  max-width: 840px;
  background: rgba(26, 18, 20, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 24px;
  color: #fff;
}
.article-hero-date {
  font-size: 16px;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
}
.article-hero-title {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.06;
  color: #f9f9f9;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.article-hero-subtitle {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 3vw, 30px);
  color: #f7f2ed;
  line-height: 1.2;
  margin-bottom: 16px;
}
.article-hero-authors {
  font-size: 14px;
  color: #fff;
  line-height: 1.7;
  font-family: "PP Mori", sans-serif;
  font-weight: 500;
}

/* ===== ARTICLE CONTENT ===== */
.article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-content {
  font-family: "PP Mori", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.02em;
  color: #421419;
}
.article-content h2 {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.0;
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
  color: #421419;
}
.article-content h3 {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.0;
  margin: 40px 0 14px;
  letter-spacing: -0.02em;
  color: #421419;
}
.article-content h4 {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.0;
  margin: 32px 0 10px;
  color: #421419;
}
.article-content p {
  margin-bottom: 22px;
}
.article-content p:last-child { margin-bottom: 0; }
.article-content a {
  color: #f8501d;
  text-decoration: none;
}
.article-content a:hover { color: #bf3601; }
.article-content strong { font-weight: 600; }
.article-content em { font-style: italic; }
.article-content ul,
.article-content ol {
  padding-left: 28px;
  margin-bottom: 22px;
}
.article-content ul li,
.article-content ol li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.article-content blockquote {
  border-left: 3px solid #d73e01;
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  color: #555;
  font-style: italic;
}
.article-content pre {
  background: #f4f0ec;
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 28px 0;
  font-family: "Fragment Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #2a1f22;
}
.article-content code {
  font-family: "Fragment Mono", monospace;
  font-size: 14px;
  background: #f4f0ec;
  padding: 2px 6px;
  border-radius: 4px;
  color: #2a1f22;
}
.article-content pre code {
  background: none;
  padding: 0;
}
.article-content img {
  width: 100%;
  border-radius: 8px;
  margin: 28px 0;
  display: block;
}
.article-content figure {
  margin: 28px 0;
}
.article-content figcaption {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-top: 8px;
  font-family: "Inter", sans-serif;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  font-family: "Inter", sans-serif;
}
.article-content th {
  text-align: left;
  padding: 10px 14px;
  background: #f4f0ec;
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
  border-bottom: 2px solid #e0d9d3;
  color: #1a1214;
}
.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #ede8e3;
  vertical-align: top;
  line-height: 1.5;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content sup {
  font-size: 11px;
  vertical-align: super;
  line-height: 0;
}
.article-content .footnotes {
  border-top: 1px solid #e8e2dc;
  margin-top: 48px;
  padding-top: 24px;
  font-size: 14px;
  color: #666;
  font-family: "Inter", sans-serif;
}
.article-content .footnotes p {
  margin-bottom: 10px;
}

/* ===== RELATED POSTS ===== */
.related-posts {
  margin-top: 64px;
  border-top: 1px solid #e8e2dc;
  padding-top: 40px;
}
.related-posts-title {
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.3s ease;
  margin: 0;
}
.related-card:hover img { transform: scale(1.02); }
.related-card-body { padding: 10px 0 0; }
.related-card-title {
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: #1a1214;
  margin-bottom: 3px;
}
.related-card-date { font-size: 11px; color: #888; font-family: "Inter", sans-serif; }

/* ===== FOOTER ===== */
.site-footer {
  background: #1a1214;
  color: #fff;
  padding: 56px 48px 80px;
  margin: 80px 16px 0;
  border-radius: 24px 24px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: auto auto;
  gap: 80px;
  align-items: start;
  margin: 0 auto 40px;
  max-width: 960px;
}
.footer-tagline {
  font-family: "PolySans Median", sans-serif;
  font-weight: 400;
  font-size: 40px;
  color: #fff;
  line-height: 1.2;
}
.footer-nav-columns {
  display: flex;
  gap: 48px;
}
.footer-nav-col h4 {
  font-size: 14px;
  letter-spacing: -0.03em;
  text-transform: none;
  color: #fff;
  margin-bottom: 14px;
  font-family: "PP Mori", sans-serif;
  font-weight: 500;
}
.footer-nav-col a {
  display: block;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 10px;
  font-family: "PP Mori", sans-serif;
  font-weight: 600;
  transition: color 0.15s;
}
.footer-nav-col a:hover { color: rgba(255, 255, 255, 0.7); }
.footer-bottom {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  max-width: 960px;
}
.footer-bottom a {
  font-size: 10px;
  font-family: "PolySans Median", sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d73e01;
  text-decoration: none;
}
.footer-bottom a:hover { color: #ff6b3d; }
.footer-copyright {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
}
.footer-wordmark {
  font-family: "PolySans Bulky", sans-serif;
  font-weight: 700;
  font-size: clamp(160px, 30vw, 480px);
  line-height: 0.75;
  color: #fff;
  letter-spacing: -0.04em;
  margin-top: 8px;
  display: block;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-header { grid-template-columns: 1fr; gap: 24px; }
  .landing-title { grid-column: 1; grid-row: 1; }
  .landing-tagline { grid-column: 1; grid-row: 2; }
}
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-nav-columns { flex-wrap: wrap; gap: 32px; }
  .article-hero-overlay { padding: 20px 20px; }
  .article-wrap { padding: 0 16px 60px; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; padding: 0 20px 60px; }
  .landing-header { grid-template-columns: 1fr; padding: 80px 20px 32px; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 40px 24px 0; margin: 80px 12px 0; }
}
