/* Styles for the /goals pages. Builds on the variables and base styles in styles.css. */

.goals-container {
  max-width: 720px;
  align-items: stretch;
}

.goals-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  animation: fadeUp 0.6s ease both;
}

.goals-header .section-label {
  width: auto;
  margin-bottom: 0;
}

.home-link {
  color: var(--accent-bright);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.home-link:hover {
  color: var(--purple-100);
}

/* Year navigation */
.year-nav {
  margin-bottom: 1.75rem;
  animation: fadeUp 0.6s ease 0.1s both;
}

.year-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-nav a {
  display: inline-block;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(149, 144, 224, 0.12);
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.year-nav a:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.year-nav a[aria-current="page"] {
  background: var(--purple-600);
  border-color: var(--purple-200);
  color: var(--text-primary);
  font-weight: 500;
}

/* Post */
.goals-post {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 2.25rem 2.25rem 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  animation: fadeUp 0.6s ease 0.2s both;
}

.goals-year {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.goals-post h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.goals-post h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 2.25rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--border);
}

.goals-post h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin: 1.75rem 0 0.5rem;
}

.goals-post p,
.goals-post ol,
.goals-post ul {
  margin-bottom: 1rem;
}

.goals-post ol,
.goals-post ul {
  padding-left: 1.5rem;
}

.goals-post li {
  margin-bottom: 0.35rem;
}

.goals-post em {
  color: var(--text-primary);
}

.goals-post strong {
  color: var(--accent-bright);
  font-weight: 600;
}

.goals-post a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(196, 191, 240, 0.45);
  transition: border-color 0.2s, color 0.2s;
}

.goals-post a:hover {
  color: var(--purple-100);
  border-color: var(--purple-100);
}

.goals-post a:has(img) {
  border-bottom: none;
}

.goals-post img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0.5rem 0;
}

/* Images that sit side by side in the source (e.g. a row of photos) share the row. */
.goals-post p:has(> img + img) {
  display: flex;
  gap: 10px;
}

.goals-post p:has(> img + img) img {
  flex: 1;
  min-width: 0;
  object-fit: cover;
}

/* Older / newer */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 48%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.pager-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.pager-next {
  text-align: right;
  margin-left: auto;
}

.pager-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.pager-title {
  font-size: 0.9rem;
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .goals-post {
    padding: 1.5rem 1.25rem;
  }

  .goals-post h1 {
    font-size: 1.75rem;
  }
}
