:root {
  --bg: #faf9f6;
  --fg: #1a1a1a;
  --muted: #777;
  --rule: #e6e4dd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

/* ---------- Landing ---------- */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 2.25rem;
}

.sections {
  display: flex;
  gap: 1.75rem 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sections a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sections a:hover,
.sections a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--fg);
  outline: none;
}

/* ---------- Inner pages ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.topbar .home {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--fg);
}

.topbar .home:hover {
  color: var(--muted);
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 1.25rem;
  letter-spacing: 0.03em;
}

.topbar nav a:hover,
.topbar nav a[aria-current="page"] {
  color: var(--fg);
}

.page h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.page .lead {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.page h2 {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.page h3 {
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 1.75rem;
  margin-bottom: 0.25rem;
}

.page p {
  margin-bottom: 1rem;
}

.page ul {
  list-style: none;
  margin-bottom: 1rem;
}

.page ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
}

.page ul li::before {
  content: "·";
  position: absolute;
  left: 0.4rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.entry {
  margin-bottom: 1.75rem;
}

.empty {
  color: var(--muted);
  font-style: italic;
  padding: 2rem 0;
}

/* ---------- YouTube card ---------- */
.yt-card {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  max-width: 100%;
}

.yt-card:hover,
.yt-card:focus-visible {
  border-color: var(--fg);
  transform: translateY(-1px);
  outline: none;
}

.yt-icon {
  width: 26px;
  height: 26px;
  fill: #ff0033;
  flex-shrink: 0;
}

.yt-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.yt-handle {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.yt-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.yt-arrow {
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.yt-card:hover .yt-arrow {
  transform: translateX(4px);
  color: var(--fg);
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --fg: #ececea;
    --muted: #8a8884;
    --rule: #2a2926;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 540px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .topbar nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}
