/* styles.css */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --accent: #0f4c81;
  --accent-hover: #0a355c;
  --max-width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --border: #2a2f3a;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: 4px;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

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

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Main Content */
main {
  flex: 1;
  padding: 3rem 0;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.lead {
  font-size: 1.125rem;
  color: var(--text);
  max-width: 62ch;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
}

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

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--muted);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Selected Work / Hub Slots */
.slot-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.slot-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
}

.slot-list li > div {
  flex: 1;
}

.slot-list li p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.slot-list a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.slot-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tag {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
  text-decoration: underline;
}