/* ===== Design tokens ===== */
:root {
  --bg: #031418;
  --bg-2: #0d1d33;
  --card: rgba(15, 30, 53, 0.55);
  --card-solid: #0f1e35;
  --border: rgba(120, 150, 200, 0.14);
  --border-strong: rgba(120, 150, 200, 0.25);
  --text: #e6edf3;
  --text-muted: #8b9bb4;
  --text-dim: #6b7d96;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --accent-soft-2: rgba(74, 222, 128, 0.22);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== Reset / base ===== */
.redesign,
.redesign * {
  box-sizing: border-box;
}

.redesign {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.redesign a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.redesign a:hover {
  color: var(--accent-dim);
}

.redesign h1, .redesign h2, .redesign h3, .redesign h4, .redesign h5, .redesign h6 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.redesign p { margin: 0; }

.redesign .r-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.r-header {
  background-color: #000;
  padding: 18px 0 8px;
}

.r-header .r-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.redesign a.r-logo,
.r-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Nunito", "Inter", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.redesign a.r-logo:hover,
.r-logo:hover { color: var(--text); }

.r-logo .bracket {
  color: var(--accent);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
}

.r-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.r-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}

.r-nav a:hover {
  color: var(--text);
}

.r-nav a.active {
  color: var(--accent);
}

.r-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.r-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ===== Hero ===== */
.r-hero {
  padding: 0 0 0px;
}

.r-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.r-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.r-hero .r-subtitle {
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.r-hero .r-lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 460px;
  margin-bottom: 28px;
}

.r-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.r-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.redesign a.r-btn-primary,
.r-btn.r-btn-primary {
  background: var(--accent);
  color: #06281a;
}

.redesign a.r-btn-primary:hover,
.r-btn.r-btn-primary:hover {
  background: var(--accent-dim);
  color: #06281a;
}

.redesign a.r-btn-ghost,
.r-btn.r-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.redesign a.r-btn-ghost:hover,
.r-btn.r-btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.r-btn .arrow {
  transition: transform 0.15s ease;
}

.r-btn:hover .arrow {
  transform: translateX(2px);
}

/* ===== Hub diagram ===== */
.r-hub {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  aspect-ratio: 1 / 1;
  position: relative;
}

.r-hub svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Focus banner ===== */
.r-focus {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.r-focus-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--accent);
}

.r-focus-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.r-focus-text {
  color: var(--text);
  font-size: 15px;
}

.r-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.redesign a.r-tag,
.r-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.redesign a.r-tag:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.08);
}

/* ===== Section ===== */
.r-section {
  padding: 10px 0 0;
}

.r-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.r-section-head h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.r-section-link {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

/* ===== Recipe cards ===== */
.r-recipes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.redesign a.r-recipe,
.r-recipe {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
  color: var(--text);
}

.redesign a.r-recipe:hover,
.r-recipe:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  color: var(--text);
}

/* Inner anchor (when .r-recipe is a div wrapping link content + tags) */
.redesign a.r-recipe-link,
.r-recipe-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.redesign a.r-recipe-link:hover,
.r-recipe-link:hover { color: inherit; }

.r-recipe-img {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #14233f, #0d1830);
  overflow: hidden;
}

.r-recipe-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.r-badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-soft-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.r-recipe-body {
  padding: 20px 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.r-recipe-body h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.r-recipe-body p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  flex: 1;
}

.r-recipe > .r-recipe-tags {
  padding: 0 22px 18px;
}

.r-recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.r-recipe-tags .r-tag {
  font-size: 12px;
  padding: 3px 10px;
}

/* ===== Latest updates ===== */
.r-updates {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}

.r-updates h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 16px;
}

.r-updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.r-updates-list li {
  display: grid;
  grid-template-columns: 16px 64px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 14.5px;
}

.r-update-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  align-self: center;
  margin-left: 4px;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.10);
}

.r-update-date {
  color: var(--text-dim);
  font-size: 13.5px;
}

.r-update-title {
  color: var(--text);
}

.r-updates-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding-top: 32px;
}

.r-updates-side .r-icon-box {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.r-updates-side p {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ===== Link cards (Books / Speaking / Videos / Projects / Connect) ===== */
.r-link-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.redesign a.r-link-card,
.r-link-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.redesign a.r-link-card:hover,
.r-link-card:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.r-link-card .r-card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.r-link-card.books .r-card-icon { color: #4ade80; }
.r-link-card.speaking .r-card-icon { color: #c084fc; }
.r-link-card.videos .r-card-icon { color: #38bdf8; }
.r-link-card.projects .r-card-icon { color: #fb923c; }
.r-link-card.connect .r-card-icon { color: #4ade80; }

.r-link-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 0;
}

.r-link-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.r-link-card .r-card-link {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.r-card-thumb {
  margin-top: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  position: relative;
}

.r-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Books card: portrait cover — show in full, centered, with dark gutters */
.r-link-card.books .r-card-thumb {
  background: linear-gradient(180deg, #0d1d33 0%, #0a1628 100%);
  padding: 6px;
}

.r-link-card.books .r-card-thumb img {
  object-fit: contain;
  object-position: center;
}

.r-card-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.r-card-thumb .play-overlay svg {
  width: 44px;
  height: 44px;
  color: rgba(255,255,255,0.95);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.r-card-socials {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.r-social {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}

.r-social.linkedin { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.r-social.github { background: #1f2937; color: #fff; }
.r-social.mastodon { background: #fff; color: #0a85ff; }
.r-social.x { background: #000; color: #fff; }
.r-social.bsky { background: #0a85ff; color: #fff; border-color: #0a85ff; }

.r-social:hover { color: #fff; opacity: 0.9; }

/* ===== Footer ===== */
.r-footer {
  background-color: #000;
  margin-top: 36px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--border);
}

.r-footer .r-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.r-quote {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 560px;
}

.r-quote .quote-mark {
  color: var(--accent);
  font-size: 36px;
  line-height: 1;
  font-family: Georgia, serif;
  margin-top: -4px;
}

.r-quote-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.r-quote-body p {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.45;
}

.r-quote-body .r-author {
  color: var(--text-muted);
  font-size: 14px;
}

.r-copy {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Page hero (subpages) ===== */
.r-page-hero {
  padding: 28px 0 8px;
}

.r-page-hero h1 {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.r-page-lead {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 760px;
}

.r-page-lead a { font-weight: 500; }

/* ===== Filter chips ===== */
.r-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.r-filters-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-right: 4px;
}

.r-filter {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.r-filter:hover {
  color: var(--text);
  border-color: rgba(120,150,200,0.4);
}

.r-filter.active {
  background: var(--accent);
  color: #06281a;
  border-color: var(--accent);
}

/* ===== Recipe list (rows) ===== */
.r-recipe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.redesign a.r-recipe-row,
.r-recipe-row {
  display: block;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.redesign a.r-recipe-row:hover,
.r-recipe-row:hover {
  color: var(--text);
  border-color: rgba(74, 222, 128, 0.35);
  background: #122643;
}

.r-recipe-row[hidden] { display: none; }

.r-recipe-row h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.r-recipe-row .r-recipe-meta {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 8px;
}

.r-recipe-row p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.r-recipe-row .r-recipe-tags { margin-top: 10px; }

.redesign a.r-recipe-row-link,
.r-recipe-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.redesign a.r-recipe-row-link:hover,
.r-recipe-row-link:hover {
  color: inherit;
}

/* Clickable tag inside a recipe row (filters the list) */
button.r-tag-filter {
  font-family: inherit;
  cursor: pointer;
}

/* ===== Per-tag colors (chip theming) ===== */
.redesign [data-tag="agents"]              { --tag-color: #10b981; } /* emerald */
.redesign [data-tag="workflows"]           { --tag-color: #f59e0b; } /* amber */
.redesign [data-tag="graph-workflows"]     { --tag-color: #f59e0b; }
.redesign [data-tag="mcp"]                 { --tag-color: #3b82f6; } /* blue */
.redesign [data-tag="tools"]               { --tag-color: #f97316; } /* orange */
.redesign [data-tag="a2a"]                 { --tag-color: #ec4899; } /* pink */
.redesign [data-tag="memory"]              { --tag-color: #a855f7; } /* violet */
.redesign [data-tag="foundations"]         { --tag-color: #06b6d4; } /* cyan */
.redesign [data-tag="skills"]              { --tag-color: #14b8a6; } /* teal */
.redesign [data-tag="human-in-the-loop"]   { --tag-color: #6366f1; } /* indigo */
.redesign [data-tag="context-engineering"] { --tag-color: #d946ef; } /* fuchsia */
.redesign [data-tag="all"]                 { --tag-color: #4ade80; } /* green */

.redesign .r-tag[data-tag],
.redesign button.r-tag-filter[data-tag],
.redesign .r-filter[data-tag] {
  border-color: color-mix(in srgb, var(--tag-color) 40%, transparent);
  background: color-mix(in srgb, var(--tag-color) 10%, transparent);
  color: color-mix(in srgb, var(--tag-color) 70%, #ffffff);
}

.redesign a.r-tag[data-tag]:hover,
.redesign button.r-tag-filter[data-tag]:hover,
.redesign .r-filter[data-tag]:hover {
  border-color: color-mix(in srgb, var(--tag-color) 70%, transparent);
  background: color-mix(in srgb, var(--tag-color) 22%, transparent);
  color: color-mix(in srgb, var(--tag-color) 80%, #ffffff);
}

.redesign .r-filter.active[data-tag] {
  background: var(--tag-color);
  border-color: var(--tag-color);
  color: #0a1628;
}

/* ===== Books page ===== */
.r-books-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.r-book {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.r-book:hover {
  border-color: rgba(74, 222, 128, 0.35);
  background: #122643;
}

.r-book-cover {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a1628;
  align-self: start;
}

.r-book-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.r-book-body h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.r-book-body p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.r-book-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.r-book-buy-label {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
}

.redesign a.r-book-buy > a,
.r-book-buy a {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.r-book-buy a:hover {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.08);
  color: var(--text);
}

.r-other-books {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 28px;
}

.r-other-books li {
  break-inside: avoid;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14.5px;
}

.r-other-books li:first-child { padding-top: 0; }

.r-other-books a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.r-other-books a:hover { color: var(--accent); }

.r-other-books-note {
  color: var(--text-dim);
  font-size: 13px;
  margin-left: 6px;
}

/* ===== Videos page ===== */
.r-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.r-video {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.r-video:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.r-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a1628;
}

.r-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.r-video-body {
  padding: 16px 18px 18px;
}

.r-video-body h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .r-videos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .r-videos { grid-template-columns: 1fr; }
}

/* ===== Speaking page ===== */
.r-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.r-event {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.r-event:hover {
  border-color: rgba(74, 222, 128, 0.35);
  background: #122643;
}

.r-event-date {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding-right: 24px;
}

.r-event-date-main {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.r-event-date-year {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}

.r-event-body h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.redesign a.r-event-body-link,
.r-event-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.r-event-body h3 a:hover { color: var(--accent); }

.r-event-meta {
  color: var(--text-muted);
  font-size: 14.5px;
}

.r-invite {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.r-invite-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--accent);
}

.r-invite-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.r-invite-body p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ===== Projects page ===== */
.r-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.r-project {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.r-project:hover {
  border-color: rgba(74, 222, 128, 0.35);
  background: #122643;
}

.r-project-img {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a1628;
  border: 1px solid var(--border);
}

.r-project-img img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.r-project-body h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.r-project-body p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.r-project-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.r-project-links a {
  font-size: 14.5px;
  font-weight: 500;
}

/* ===== About page ===== */
.r-bio {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
  padding: 28px 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
}

.r-bio-photo-frame {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a2c 0%, #0d4827 100%);
  border: 2px solid rgba(74, 222, 128, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Nunito", "Inter", sans-serif;
  font-size: 64px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  overflow: hidden;
}

.r-bio-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.r-bio-body h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.r-bio-roles {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.r-bio-body p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 660px;
}

.r-bio-body p:last-child { margin-bottom: 0; }

.r-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.redesign a.r-highlight,
.r-highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.redesign a.r-highlight:hover,
.r-highlight:hover {
  color: var(--text);
  border-color: rgba(74, 222, 128, 0.35);
  background: #122643;
  transform: translateY(-1px);
}

.r-highlight-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.r-highlight-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.r-definition {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.r-definition h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

.r-definition p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 8px;
}

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

.r-definition-pron {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  margin-right: 4px;
}

/* ===== Contact page ===== */
.r-socials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.redesign a.r-social-card,
.r-social-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0f1e35;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.redesign a.r-social-card:hover,
.r-social-card:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.r-social-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.15s ease;
}

.r-social-card:hover .r-social-card-icon {
  transform: scale(1.05);
}

.r-social-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.r-social-card-body h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.r-social-card-handle {
  color: var(--text-muted);
  font-size: 13.5px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.r-social-card-arrow {
  color: var(--text-dim);
  font-size: 18px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.r-social-card:hover .r-social-card-arrow {
  transform: translateX(3px);
  color: var(--text);
}

/* Per-network branding */
.r-social-card[data-net="bluesky"]  .r-social-card-icon { background: #0a85ff; }
.r-social-card[data-net="bluesky"]:hover  { border-color: #0a85ff; }

.r-social-card[data-net="linkedin"] .r-social-card-icon { background: #0a66c2; }
.r-social-card[data-net="linkedin"]:hover { border-color: #0a66c2; }

.r-social-card[data-net="github"]   .r-social-card-icon { background: #1f2937; border: 1px solid #374151; }
.r-social-card[data-net="github"]:hover   { border-color: #6e7681; }

.r-social-card[data-net="x"]        .r-social-card-icon { background: #000; border: 1px solid #2a2a2a; }
.r-social-card[data-net="x"]:hover        { border-color: #555; }

.r-social-card[data-net="mastodon"] .r-social-card-icon { background: #6364ff; }
.r-social-card[data-net="mastodon"]:hover { border-color: #6364ff; }

.r-social-card[data-net="threads"]  .r-social-card-icon { background: #000; border: 1px solid #2a2a2a; }
.r-social-card[data-net="threads"]:hover  { border-color: #555; }

.r-social-card[data-net="aboutme"]  .r-social-card-icon { background: #00a98f; }
.r-social-card[data-net="aboutme"]:hover  { border-color: #00a98f; }

.r-social-card[data-net="youtube"]  .r-social-card-icon { background: #ff0033; }
.r-social-card[data-net="youtube"]:hover  { border-color: #ff0033; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .r-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .r-hub { justify-self: center; max-width: 420px; }
  .r-recipes { grid-template-columns: 1fr; }
  .r-updates { grid-template-columns: 1fr; }
  .r-updates-side { padding-top: 0; }
  .r-link-cards { grid-template-columns: repeat(2, 1fr); }
  .r-nav { gap: 18px; }
  .r-nav a { font-size: 14px; }
  .r-other-books { columns: 1; }
}

@media (max-width: 720px) {
  .r-book { grid-template-columns: 120px 1fr; gap: 18px; padding: 18px; }
  .r-book-body h3 { font-size: 19px; }
  .r-event { grid-template-columns: 1fr; gap: 12px; padding: 18px 20px; }
  .r-event-date { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 10px; flex-direction: row; gap: 8px; align-items: baseline; }
  .r-project { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .r-project-img img { height: 200px; }
  .r-bio { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .r-bio-photo { display: flex; justify-content: center; }
  .r-bio-photo-frame { width: 140px; height: 140px; font-size: 44px; }
  .r-highlights { grid-template-columns: repeat(2, 1fr); }
  .r-socials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .r-hero h1 { font-size: 40px; }
  .r-link-cards { grid-template-columns: 1fr; }
  .r-nav { display: none; }
  .r-nav-toggle { display: inline-flex; }
  .r-nav.open {
    display: flex;
    position: absolute;
    top: 70px;
    right: 16px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: var(--radius);
    flex-direction: column;
    gap: 12px;
    z-index: 100;
  }
  .r-section { padding-top: 22px; }
  .r-focus { flex-direction: column; align-items: flex-start; }
  .r-updates-list li { grid-template-columns: 16px 56px 1fr; }
}
