/* ========================================
   SUPREMATISM - Generative Art Theme
   Full-width compositions
   ======================================== */

:root {
  --black: #1A1A1A;
  --red: #C93A32;
  --cream: #F2EDE4;
  --gray: #8A8680;
  --tan: #C4A87A;
  
  --font-chinese: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  --font-display: 'Bebas Neue', var(--font-chinese);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  --font-body: 'Source Serif 4', "Noto Serif SC", "Source Han Serif SC", serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--black);
  background: var(--cream);
  overflow-x: hidden;
}

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

/* ========================================
   SUPREMATIST CANVAS
   ======================================== */

.suprematist-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ========================================
   CONTENT PLANE - WIDER NOW
   ======================================== */

.content-plane {
  position: relative;
  z-index: 1;
  min-height: 100%;
}

.container {
  max-width: 820px;
  margin: 90px auto 0;
  padding: 60px 60px 80px;
  background: rgba(242, 237, 228, 0.94);
}

/* ========================================
   HEADER BAR - Minimal Constructivist
   ======================================== */

.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: transparent;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.header-bar.scrolled {
  background: rgba(244, 241, 235, 0.95);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.header-bar.hidden {
  transform: translateY(-100%);
}

.title-composition {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 40px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.header-content:hover .header-accent {
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.header-content:hover .header-title {
  color: var(--red);
  transition: color 0.2s ease;
}

/* Red square accent - slides in from left */
.header-accent {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--red);
  flex-shrink: 0;
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* Title - slides in from left with delay */
.header-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.05em;
  margin: 0;
  white-space: nowrap;
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  opacity: 0;
}

/* Entrance animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* Responsive */
@media (max-width: 700px) {
  .title-composition {
    padding: 0 25px;
  }
  
  .header-title {
    font-size: 1.25rem;
  }
  
  .container {
    margin-top: 70px;
  }
}

@media (max-width: 500px) {
  .header-bar {
    height: 60px;
  }
  
  .title-composition {
    padding: 0 20px;
  }
  
  .header-accent {
    width: 10px;
    height: 10px;
  }
  
  .header-title {
    font-size: 1.1rem;
  }
  
  .container {
    margin-top: 60px;
  }
}

/* ========================================
   POST PAGE HEADER
   ======================================== */

.post-page-header {
  margin-bottom: 50px;
  position: relative;
}

.post-page-header::after {
  display: none;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.home-link:hover {
  transform: translateX(5px);
}

.home-shape {
  display: inline-block;
  width: 30px;
  height: 30px;
  background: var(--black);
  clip-path: polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%);
}

.home-link:hover .home-shape {
  background: var(--red);
}

.home-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.1em;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--black);
  opacity: 0.4;
  margin-bottom: 45px;
  text-transform: uppercase;
}

/* ========================================
   STORIES
   ======================================== */

.stories {
  margin-bottom: 50px;
}

.story-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.story {
  margin-bottom: 40px;
  padding-bottom: 40px;
  padding-left: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-left: 3px solid transparent;
  transition: border-left-color 0.2s ease;
  cursor: pointer;
}

.story-link:hover .story {
  border-left-color: var(--red);
}

.story-link:last-child .story {
  border-bottom: none;
}

.story-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--black);
  transition: color 0.15s ease;
}

.story-link:hover .story-title {
  color: var(--red);
}

.story-date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gray);
  margin-bottom: 12px;
}

.story-excerpt {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--black);
  opacity: 0.8;
  margin-bottom: 14px;
}

.read-more {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

.read-more:hover {
  text-decoration: underline;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
  display: flex;
  gap: 5px;
  margin: 50px 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
}

.page-link {
  padding: 8px 12px;
  color: var(--black);
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.page-link:hover {
  opacity: 1;
}

.page-link.current {
  background: var(--red);
  color: var(--cream);
  opacity: 1;
}

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

.post-header {
  margin-bottom: 45px;
  position: relative;
  padding-bottom: 20px;
}

.post-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--red);
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.post-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.post-content {
  font-size: 0.9375rem;
  line-height: 1.9;
}

.post-content h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 42px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--red);
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 32px 0 12px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--red);
  background: rgba(0,0,0,0.02);
  font-style: italic;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content ul,
.post-content ol {
  margin: 20px 0;
  padding-left: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 2px;
}

.post-content pre {
  margin: 28px 0;
  padding: 18px;
  background: var(--black);
  color: var(--cream);
  overflow-x: auto;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.post-content img {
  max-width: 100%;
  margin: 28px 0;
}

.post-content hr {
  margin: 40px 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--red) 40px, rgba(0,0,0,0.1) 40px);
}

.post-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.back-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--red);
}

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

.site-footer {
  padding: 50px 0 35px;
  text-align: center;
}

.site-footer p {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.site-footer .footer-meta {
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

.site-footer .footer-links {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
}

.site-footer .footer-links a {
  color: var(--black);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
  color: var(--red);
}

.site-footer .footer-divider {
  margin: 0 10px;
  color: var(--gray);
}

.site-footer .footer-meta a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-footer .footer-meta a:hover {
  border-bottom-color: var(--red);
}

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

@media (max-width: 900px) {
  .container {
    max-width: 680px;
    padding: 90px 45px 70px;
  }
  
  .site-title {
    font-size: 2.5rem;
  }
  
  .story-title {
    font-size: 1.375rem;
  }
}

@media (max-width: 700px) {
  .container {
    max-width: 100%;
    padding: 80px 35px 60px;
  }
  
  .site-title {
    font-size: 2rem;
  }
  
  .story-title {
    font-size: 1.25rem;
  }
  
  .story-excerpt {
    font-size: 0.875rem;
  }
}

@media (max-width: 500px) {
  .container {
    padding: 60px 24px 50px;
  }
  
  .site-title {
    font-size: 1.625rem;
  }
  
  .story-title {
    font-size: 1.125rem;
  }
}

/* ========================================
   SELECTION
   ======================================== */

::selection {
  background: var(--red);
  color: var(--cream);
}
