/* ==========================================================================
   Design System & Color Tokens (Alisa Wuffles style — Pure Light Mode)
   ========================================================================== */
:root {
  --bg: #FAFAFA;
  --card-bg: #FFFFFF;
  --border: #E5E7EB;
  --border-hover: #D1D5DB;
  --text: #2C2C2C;
  --text-heading: #111827;
  --text-muted: #6B7280;
  --text-italic: #4B5563;
  --accent: #6D28D9;
  --accent-light: #7C3AED;
  --accent-hover: #5B21B6;
  --accent-soft: rgba(109, 40, 217, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 3px 8px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Source Sans 3", Inter, sans-serif;
  --bg-card: #FFFFFF;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > section {
  padding: 3.5rem 0;
}

main > section:first-of-type {
  padding-top: 4.5rem;
}

main > section + section {
  border-top: 1px solid var(--border);
}

main > section h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 1.75rem;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.profile-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.avatar {
  width: 195px;
  height: 195px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.social-links {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link a,
.social-link button {
  min-width: 32px;
  min-height: 32px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.social-link a:hover,
.social-link button:hover {
  transform: translateY(-1px);
}

.social-link a:active,
.social-link button:active {
  transform: scale(0.92);
}

.social-icon-img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  vertical-align: middle;
  display: block;
  border-radius: 3px;
  transition: filter 0.15s ease;
}

.social-link .cv-link {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #4B5563;
  border-radius: 4px;
  padding: 2.5px 5px;
  height: 21px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.social-link .cv-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Tooltip for email button */
.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--accent) transparent transparent transparent;
}

.social-link button:hover .tooltip,
.social-link .tooltip.show {
  opacity: 1;
}

.bio-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bio-text {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

.bio-text:last-child {
  margin-bottom: 0;
}

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

.bio-text a strong {
  font-weight: 700;
  color: var(--accent);
}

.bio-text a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.project-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.project-title a {
  color: var(--text-heading);
  text-decoration: none;
}

.project-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
  line-height: 1.5;
}

.project-metric {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

.project-metric strong {
  font-weight: 700;
  color: var(--text-heading);
}

.project-tech {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-style: italic;
  line-height: 1.4;
}

.project-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.15rem 0.65rem;
  font-size: 0.8rem;
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.5;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pill-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
}

.pill-btn:active {
  transform: scale(0.96);
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.exp-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exp-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.exp-role-org {
  font-size: 1.02rem;
  color: var(--text-heading);
  line-height: 1.4;
}

.exp-role-org strong {
  font-weight: 700;
  color: var(--text-heading);
}

.exp-role-org .exp-org {
  color: var(--accent);
  font-weight: 600;
}

.exp-date {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-summary {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   Blog Section
   ========================================================================== */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.post-row {
  display: flex;
  align-items: baseline;
  gap: 1.75rem;
}

.post-date {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-title {
  font-size: 1.02rem;
  color: var(--text-heading);
  font-weight: 500;
  transition: color 0.15s ease;
}

.post-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ==========================================================================
   Article / Blog Post / Deep Dive Page Styles
   ========================================================================== */
.blog-post-page {
  position: relative;
}

.blog-post-article {
  padding: 3rem 0 4rem;
  max-width: 100%;
  min-width: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-header .date {
  display: block;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.post-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.case-study-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

/* Sticky Contents Sidebar */
.toc-sidebar {
  position: fixed;
  left: max(1.5rem, calc((100vw - 820px) / 2 - 240px));
  top: 6rem;
  width: 210px;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  z-index: 50;
}

.toc-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toc-list a {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-left: 0.85rem;
  display: block;
  line-height: 1.4;
  transition: color 0.15s ease;
  text-decoration: none;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent);
}

.toc-list a.active {
  font-weight: 600;
  border-left: 2px solid var(--accent);
  margin-left: -2px;
}

@media (max-width: 1180px) {
  .toc-sidebar {
    display: none;
  }
}

/* Long-form Prose */
.prose {
  line-height: 1.8;
  font-size: 1.05rem;
  color: var(--text);
  max-width: 100%;
  overflow-wrap: break-word;
}

.prose section {
  padding: 0;
  margin: 0 0 2rem;
  border: none;
}

.prose section + section {
  border-top: none;
}

.prose section:first-of-type {
  padding-top: 0;
}

.prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-light);
  margin: 1.75rem 0 0.65rem;
}

.prose h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1.35rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.35rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2.5px;
  font-weight: 500;
}

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

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  color: var(--accent);
}

.architecture-diagram {
  background: #F8F9FA;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  max-width: 100%;
}

.architecture-diagram pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  overflow-x: visible;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-heading);
  white-space: pre;
}

.prose pre {
  background: #F8F9FA;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  max-width: 100%;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-heading);
  white-space: pre;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
}

.prose table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.prose th, .prose td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: #F9FAFB;
  font-weight: 600;
  color: var(--text-heading);
}

.prose tr:nth-child(even) td {
  background: #FAFAFA;
}

.prose video, .prose img {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 1.75rem 0;
}

/* Deep Dive Media & Custom Components */
.visuals-section {
  margin-bottom: 2rem;
}

.visuals-block {
  margin: 1.75rem 0;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0 1rem;
}

.video-container {
  width: 100%;
  margin: 1.5rem 0;
}

.project-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
  background: #000;
  margin: 0 !important;
}

.image-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
  align-items: start;
}

@media (max-width: 480px) {
  .image-pair-grid {
    gap: 0.65rem;
  }
}

.image-pair-grid img,
.project-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 !important;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

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

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.metric-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 !important;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.tag-pill {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  color: var(--text-muted);
  line-height: 1.4;
}

.callout-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
}

.callout-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.callout-title {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

footer p {
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 680px) {
  section {
    padding: 2.75rem 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .profile-col {
    align-items: center;
  }

  .avatar {
    width: 175px;
    height: 175px;
  }

  .social-links {
    justify-content: center;
  }

  .bio-name {
    font-size: 2rem;
  }

  .exp-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .post-row {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--accent);
  color: #FFFFFF;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
video:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Hero actions
   ========================================================================== */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

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

.btn-secondary:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* ==========================================================================
   Project hierarchy
   ========================================================================== */
.section-lede {
  margin: -1rem 0 1.75rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.card-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card.featured {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.6rem;
}

.project-card.featured .project-title {
  font-size: 1.4rem;
}

.project-card.featured .project-desc {
  color: var(--text);
  font-size: 0.98rem;
}

.featured-media {
  display: block;
  align-self: stretch;
  max-height: 300px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.featured-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #F3F4F6;
}

.featured-media-pair {
  align-items: center;
  align-self: center;
  max-height: none;
}

.featured-media-pair img {
  border-radius: 6px;
  height: auto;
  max-height: 288px;
  object-fit: contain;
}

.project-tech {
  font-style: normal;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-grid .project-card {
  display: flex;
  flex-direction: column;
}

.project-grid .project-links {
  margin-top: auto;
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 2.5rem 0 0.75rem;
}

.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.compact-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.compact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.25rem;
}

.compact-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-heading);
}

.compact-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.compact-item p {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

h3.exp-role-org {
  margin: 0;
  font-weight: 400;
}

/* ==========================================================================
   Case studies
   ========================================================================== */
.case-meta {
  margin: -0.75rem 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.metrics-grid.glance {
  margin: 0 0 2rem;
}

.glance .metric-val {
  font-size: 1.2rem;
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.5rem 0;
}

.device-row figure {
  margin: 0;
  flex: 0 1 180px;
  text-align: center;
}

.device-row figure.watch-fig {
  flex-basis: 140px;
}

.device-row img {
  width: 100%;
  height: auto;
  margin: 0 !important;
  border-radius: 12px;
}

.device-row figcaption,
.prose figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.prose figure {
  margin: 1.5rem 0;
}

.prose figure img {
  margin: 0;
}

.prose .device-row figure,
.prose .image-pair-grid figure {
  margin: 0;
}

.prose .architecture-diagram {
  margin: 1.5rem 0;
}

.prose .architecture-diagram pre {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  overflow-x: visible;
}

.repo-cta {
  margin-top: 2.5rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 0.98rem;
}

.repo-cta p {
  margin: 0 0 0.6rem;
}

/* Footer links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
}

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

@media (max-width: 680px) {
  .project-card.featured {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .featured-media {
    max-height: 200px;
  }

  .featured-media-pair {
    max-width: 300px;
    max-height: none;
  }

  .featured-media-pair img {
    max-height: 220px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: center;
  }

  .device-row figure {
    flex-basis: 140px;
  }

  .device-row figure.watch-fig {
    flex-basis: 110px;
  }
}
