:root {
  --bg: #000000;
  --ink: #f4f7fb;
  --card: #050505;
  --line: #1a1a1a;
  --accent: #00e8a4;
  --accent-2: #57b8ff;
  --muted: #8f97a3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  color: var(--ink);
  background: radial-gradient(
      circle at 85% -10%,
      rgba(87, 184, 255, 0.2) 0%,
      transparent 38%
    ),
    radial-gradient(circle at 0% 100%, rgba(0, 232, 164, 0.18) 0%, transparent 40%),
    var(--bg);
  min-height: 100vh;
  background-attachment: fixed;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(#fff 0.45px, transparent 0.45px);
  background-size: 4px 4px;
}

.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.hero {
  padding: 40px 0 20px;
  max-width: 680px;
  animation: fadeInUp 0.8s ease both;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent-2);
}

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  margin: 10px 0 16px;
}

.hero p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.posts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card {
  background: linear-gradient(180deg, #090909 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 28px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 232, 164, 0.06);
  animation: fadeInUp 0.7s ease both;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: #2c2c2c;
}

.post-card:nth-child(2) {
  animation-delay: 0.08s;
}

.post-card:nth-child(3) {
  animation-delay: 0.16s;
}

.date {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card h2 {
  font-family: "Instrument Serif", Georgia, serif;
  margin: 8px 0 10px;
  font-size: 1.5rem;
  line-height: 1.1;
}

.post-card p {
  margin: 0;
  line-height: 1.5;
}

.post-card a {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.about,
.join {
  margin-top: 38px;
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.about h2,
.join h2 {
  margin: 0 0 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.8rem;
}

.about p {
  margin: 0;
  line-height: 1.6;
}

#subscribe-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input,
button {
  font: inherit;
}

input {
  flex: 1 1 240px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #262626;
  background: #030303;
  color: var(--ink);
}

input::placeholder {
  color: #6d7480;
}

button {
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #00150f;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease;
}

button:hover {
  filter: brightness(1.08);
}

#form-message {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: var(--accent);
}

footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 20px 26px;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .posts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .posts {
    grid-template-columns: 1fr;
  }
}
