/* ==========================================================================
   Components — Cards, Badges, Nav, Footer, Sections
   ========================================================================== */

/* Navigation */
nav[aria-label="Primary"] ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

nav[aria-label="Primary"] a {
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 400;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

nav[aria-label="Primary"] a:visited {
  color: var(--fg);
}

nav[aria-label="Primary"] a:hover {
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}

nav[aria-label="Primary"] a[aria-current="page"] {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.site-header .site-mark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-monogram {
  color: var(--accent);
  display: block;
}

.site-header .site-mark:visited {
  color: var(--fg);
}

@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  margin-top: var(--space-2xl);
  color: var(--muted);
  font-size: var(--text-sm);
}

footer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: var(--space-md);
}

footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-sm);
}

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

footer nav a:visited {
  color: var(--muted);
}

/* Card */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  background: var(--surface);
  margin-bottom: var(--space-lg);
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
}

.card h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.card h3 a {
  color: var(--fg);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Status Badge */
.badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.badge--active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}

.badge--beta {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  background: color-mix(in oklab, var(--accent-secondary) 10%, transparent);
}

.badge--archived {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface);
}

/* Section (content block) */
.section {
  margin-bottom: var(--space-2xl);
}

.section > :last-child {
  margin-bottom: 0;
}

/* Hero */
.hero {
  margin-bottom: var(--space-2xl);
}

.hero .u-photo {
  width: 160px;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
}

.hero .tagline {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

/* Profile Links */
.profile-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.profile-links a {
  font-family: var(--font-code);
  font-size: var(--text-sm);
}

/* Garden Section (featured) */
.garden-feature {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-lg);
  background: color-mix(in oklab, var(--accent) 5%, var(--bg));
  margin-bottom: var(--space-2xl);
}

.garden-feature h2 {
  margin-top: 0;
  color: var(--accent);
}

/* Post Card */
.post-card {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.post-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.post-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.post-card h3 a {
  color: var(--fg);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--accent);
}

.post-card .post-meta {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.post-card .post-excerpt {
  color: var(--muted);
}

.post-card .post-links {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
}

.post-card .post-links a {
  margin-right: var(--space-md);
}

/* Resume Sections */
.resume-section {
  margin-bottom: var(--space-2xl);
}

.resume-entry {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.resume-entry:last-child {
  border-bottom: none;
}

.resume-entry h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.resume-entry .org {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--muted);
}

.resume-entry .dates {
  font-family: var(--font-code);
  font-size: var(--text-xs);
  color: var(--muted);
}

.resume-entry .highlights {
  margin-top: var(--space-sm);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-code);
  font-size: var(--text-sm);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
