/* 03-literary-blog — Swiss modernism literary blog */

:root {
  --bg: #FAFAFA;
  --text: #09090B;
  --text-muted: #52525B;
  --accent: #2563EB;
  --border: #E4E4E7;
  --font-display: "Caveat", cursive;
  --font-body: "Quicksand", system-ui, sans-serif;
  --max-width: 80rem;
  --grid-cols: 12;
  --gutter: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.skip-link:focus { top: 1rem; }

/* 12-column grid system */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--gutter);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: #1d4ed8; color: #fff; }

.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.section-link:hover { text-decoration: underline; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.nav-inner,
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.site-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1;
}

.site-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin: 0.25rem 0 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-links a[aria-current="page"] { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  cursor: pointer;
}

/* Hero — asymmetric */
.hero {
  padding: 5rem 0 4rem;
}

.hero-asymmetric {
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  gap: var(--gutter);
  align-items: end;
}

.hero-main h1 {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.hero-main h1 em {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.15em;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 28rem;
}

.hero-main .btn { margin-top: 1.75rem; }

.hero-side {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.hero-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.hero-side p {
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.6;
}

.hero-accent-block {
  background: var(--text);
  color: var(--bg);
  padding: 2rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.3;
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* Section */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-header h1,
.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.section-number {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
}

/* Post cards */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 120px 1fr 200px;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background 0.2s;
}

.post-item:first-child { border-top: 1px solid var(--border); }

.post-item:hover { background: rgba(37, 99, 235, 0.03); }

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.post-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.post-item h3 a { color: var(--text); }
.post-item h3 a:hover { color: var(--accent); }

.post-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

.post-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: right;
}

/* Article previews (full) */
.article-preview {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.article-preview:first-child { border-top: 1px solid var(--border); }

.article-preview-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.article-preview h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.article-preview h2 a { color: var(--text); }
.article-preview h2 a:hover { color: var(--accent); }

.article-meta {
  text-align: right;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-meta time { display: block; margin-bottom: 0.25rem; }

.article-preview-body {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
}

.article-preview-body p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.read-more svg { width: 1rem; height: 1rem; }

.article-pullquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text);
}

/* Newsletter */
.newsletter {
  background: var(--text);
  color: var(--bg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.newsletter h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.newsletter p {
  font-size: 0.9375rem;
  opacity: 0.8;
  margin: 0;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.newsletter-form button {
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
}

/* About page */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  padding: 4rem 0;
}

.about-portrait {
  aspect-ratio: 3/4;
  background: var(--border);
  position: relative;
}

.about-portrait::after {
  content: "沈";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--text-muted);
  opacity: 0.3;
}

.about-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.about-content .role {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 2rem;
}

.about-content p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

/* Reading list */
.reading-list {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.reading-list h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 2rem;
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.reading-item {
  border-top: 2px solid var(--text);
  padding-top: 1rem;
}

.reading-item cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.reading-item span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.reading-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-inner > p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner nav {
  display: flex;
  gap: 1.5rem;
}

.footer-inner nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner nav a:hover { color: var(--accent); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.footer-brand p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-asymmetric {
    grid-template-columns: 1fr;
  }

  .hero-side {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .post-tag { text-align: left; }

  .article-preview-header,
  .article-preview-body {
    grid-template-columns: 1fr;
  }

  .article-meta { text-align: left; }

  .newsletter {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .reading-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }

  .nav-links.is-open { display: flex; }

  .header-inner { flex-direction: column; align-items: flex-start; }

  .newsletter-form { flex-direction: column; }
}
