/* ===== Base & Theme ===== */
:root{
  --bg: #0b0e10;
  --ink: #e9eef2;
  --muted: #a9b3bc;
  --accent: #6ee7ff;
  --card: #11151a;
  --rule: #242b31;
  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);

  --hero-bg-pos: 30% 25%;
  --hero-overlay: rgba(11,14,16,.72);
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* ===== Layout ===== */
.container{
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header{
  position: sticky;
  top: 0;
  backdrop-filter: saturate(120%) blur(6px);
  background: rgba(7,9,11,.6);
  border-bottom: 1px solid var(--rule);
  z-index: 10;
}

.brand{
  margin: 0;
  padding: 16px 0 4px;
  text-align: center;
  letter-spacing: .18em;
  font-weight: 800;
  font-variant: small-caps;
}

.tag{
  margin: 0 0 10px;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

.nav{
  display: flex;
  gap: 18px;
  justify-content: center;
  padding-bottom: 12px;
}
.nav a{
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.nav a:hover{ color: var(--ink); }

/* ===== Hero ===== */
.hero{
  position: relative;
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(var(--hero-overlay), var(--hero-overlay)),
    url("belowhorizon.png") var(--hero-bg-pos) / cover no-repeat;
  background-blend-mode: multiply;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.cover img{
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.blurb .kicker{
  font-weight: 800;
  letter-spacing: .06em;
  font-variant: small-caps;
  margin: 0 0 10px;
}
.cta-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ===== Buttons ===== */
.btn{
  appearance: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: transparent;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .04s ease, background .2s ease, border-color .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn[aria-disabled="true"]{ opacity: .55; cursor: not-allowed; }
.btn:hover{ transform: translateY(-1px); border-color: var(--ink); }
.btn.primary{
  background: linear-gradient(180deg, #1a9db9, #137d95);
  border-color: #0e5a6b;
}
.btn.primary:hover{
  background: linear-gradient(180deg, #22bfe0, #1590ab);
  border-color: #0e5a6b;
}

/* ===== Excerpt ===== */
.excerpt{
  padding: 42px 0;
  border-bottom: 1px solid var(--rule);
}
.section-title{
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .06em;
  font-variant: small-caps;
  margin: 0 0 6px;
}

/* ===== Excerpt Cards ===== */
.excerpt-list{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.excerpt-card{
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.excerpt-media{
  margin: 0; /* reset figure margins */
}

.excerpt-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.excerpt-content{
  padding: 18px 20px 20px;
}

.excerpt-title{
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Mobile fix */
@media (max-width: 720px){
  .excerpt-card{
    grid-template-columns: 1fr;
  }
  .excerpt-media{
    border-bottom: 1px solid var(--rule);
    border-right: 0;
    overflow: hidden;
  }
  .excerpt-media img{
    width: 100%;
    height: auto;       /* prevents stretching */
    object-fit: cover;
    display: block;
  }
}

/* ===== About ===== */
.about{
  padding: 42px 0;
  border-bottom: 1px solid var(--rule);
}
.about-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.author-pic img{
  width: 180px;
  height: 180px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
}

/* ===== Newsletter ===== */
.newsletter{
  padding: 42px 0 56px;
}
.muted{ color: var(--muted); }
form{ margin-top: 12px; }
.form-row{
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;         
}
input[type="email"]{
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  outline: none;
}
input[type="email"]::placeholder{ color: #7c8a96; }
.status{
  min-height: 1.25em;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer{
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  color: var(--muted);
  text-align: center;
}
.tiny{ font-size: .85rem; }

/* ===== Responsive ===== */
@media (min-width: 880px){
  .hero-grid{
    grid-template-columns: 0.92fr 1.08fr;
    align-items: center;
    gap: 36px;
  }
  .about-grid{
    grid-template-columns: 0.5fr 1.5fr;
    align-items: center;
  }
}

@media (max-width: 640px){
  :root{
    --hero-bg-pos: 32% 48%;
  }
}

@media (max-width: 520px){
  .hero{ padding: 36px 0 22px; }
  .cta-row .btn, .form-row .btn{ width: 100%; }
  .form-row{ flex-direction: column; }
  .author-pic img{ width: 140px; height: 140px; }
}
