/*
  Castor & Pollux
  Small static site. No JavaScript.
*/

:root {
  --paper: #fff8e8;
  --paper-soft: rgba(255, 248, 232, 0.9);
  --ink: #1f241b;
  --muted: #58614e;
  --green: #435f2c;
  --green-dark: #26391d;
  --pink: #b8325c;
  --line: rgba(67, 95, 44, 0.28);
  --shadow: rgba(24, 32, 20, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(rgba(28, 44, 22, 0.08), rgba(28, 44, 22, 0.28)),
    url("images/hibiscus.jpg?v=5");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(255, 255, 255, 0.24),
      transparent 24rem
    ),
    radial-gradient(
      circle at 75% 85%,
      rgba(184, 50, 92, 0.16),
      transparent 22rem
    );
}

.page {
  min-height: 100vh;
  padding: 44px 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.notebook {
  width: min(920px, 100%);
  padding: clamp(22px, 5vw, 52px);
  background: var(--paper-soft);
  border: 1px solid rgba(255, 248, 232, 0.42);
  box-shadow: 0 22px 70px var(--shadow);
  backdrop-filter: blur(3px);
}

.site-header {
  max-width: 760px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--pink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 780px;
  color: var(--green-dark);
  font-size: clamp(2.2rem, 6.2vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.65;
}

.hero-photo {
  margin: 28px 0 0;
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 232, 0.6);
  padding: 8px;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
}

.hero-photo figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.small-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.nav a,
.kicker a,
footer a {
  color: var(--green-dark);
  text-decoration: none;
}

.nav a {
  padding: 5px 8px;
  border: 1px solid transparent;
}

.nav a:hover,
.kicker a:hover,
footer a:hover {
  color: var(--pink);
}

.nav a:hover {
  border-color: rgba(184, 50, 92, 0.3);
  background: rgba(184, 50, 92, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

article {
  min-height: 160px;
  padding: 22px;
  background: rgba(255, 248, 232, 0.76);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition:
    background 140ms ease,
    transform 140ms ease;
}

article:hover {
  background: rgba(255, 248, 232, 0.92);
  transform: translateY(-1px);
}

article h2 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 1.15rem;
}

article h2 a {
  color: var(--green-dark);
  text-decoration: none;
}

article h2 a:hover {
  color: var(--pink);
}

article h3 {
  margin: 18px 0 8px;
  color: var(--green-dark);
  font-size: 1rem;
  line-height: 1.2;
}

article h3:first-of-type {
  margin-top: 0;
}

article ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.35;
}

article li + li {
  margin-top: 4px;
}

article a {
  color: var(--green-dark);
}

article a:hover {
  color: var(--pink);
}

details + details {
  margin-top: 8px;
}

article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: bold;
}

summary:hover {
  color: var(--pink);
}

details ul {
  margin-top: 10px;
}

footer {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

@media (max-width: 680px) {
  body {
    background-attachment: scroll;
  }

  .page {
    padding: 18px 10px;
  }

  .notebook {
    padding: 22px;
  }

  .hero-photo img {
    height: 240px;
  }

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

  article {
    min-height: auto;
  }
}
