/* ==========================================================================
   Akash Jaiswal — Desktop Dashboard & Design System
   ========================================================================== */

/* Design tokens — single light theme, muted neutrals */
:root {
  --bg-color: #F6F3EE;
  --tile-bg: #FFFFFF;
  --tile-radius: 18px;
  --tile-border: rgba(28, 26, 23, 0.08);
  --tile-shadow: 0 1px 2px rgba(28, 26, 23, 0.03);

  --main-color: #24221F;
  --secondary-color: #3A5A9A;
  --body-color: #5C5853;
  --muted-color: #6F6A64;

  --accent-rgb: 58, 90, 154;
  --accent-soft: rgba(var(--accent-rgb), 0.07);
  --accent-warm: #C07A4A;

  /* Soft section tones — tinted, never loud */
  --blue: 52, 104, 176;
  --green: 38, 128, 96;
  --violet: 112, 86, 184;
  --amber: 176, 104, 28;
  --rose: 186, 72, 108;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  --dashboard-max: 1380px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(var(--blue), 0.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(var(--rose), 0.06), transparent 60%),
    var(--bg-color);
  background-attachment: fixed;
  color: var(--body-color);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Floating Utility Bar — desktop */
.top-utility-bar {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile name label (hidden on desktop) */
.mobile-nav-name {
  display: none;
}

/* Inline SVG icons (self-hosted sprite, replaces Font Awesome webfont) */
.fai {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

.utility-btn {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  color: var(--main-color);
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  box-shadow: var(--tile-shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.utility-btn:hover {
  transform: translateY(-2px);
  border-color: var(--secondary-color);
}

/* Dashboard Wrapper */
.dashboard-wrapper {
  max-width: var(--dashboard-max);
  margin: 0 auto;
  padding: 2.2rem 1.8rem 1.8rem 1.8rem;
  display: grid;
  grid-template-columns: 310px 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Bento Tile Base */
.bento-tile {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--tile-radius);
  padding: 1.5rem;
  box-shadow: var(--tile-shadow);
  transition: var(--transition);
}

.bento-tile:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 8px 24px rgba(28, 26, 23, 0.042);
}

.tone-blue   { --tone: var(--blue); }
.tone-green  { --tone: var(--green); }
.tone-violet { --tone: var(--violet); }
.tone-amber  { --tone: var(--amber); }
.tone-rose   { --tone: var(--rose); }

.bento-tile[class*="tone-"] {
  background-image: linear-gradient(180deg, rgba(var(--tone), 0.06) 0, rgba(var(--tone), 0) 160px);
}

.bento-tile[class*="tone-"]:hover {
  border-color: rgba(var(--tone), 0.28);
}

.tile-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.tile-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgb(var(--tone, var(--accent-rgb)));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
}

.tile-heading {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--main-color);
  margin-bottom: 1.1rem;
}

/* Profile Tile */
.profile-tile {
  text-align: left;
}

.avatar-box {
  width: 100%;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.22);
  border: 2px solid rgba(var(--accent-rgb), 0.18);
  background: var(--accent-soft);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  display: block;
}

.profile-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--main-color);
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.profile-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--secondary-color);
  margin-bottom: 0.8rem;
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--body-color);
  margin-bottom: 1rem;
}

.profile-bio strong {
  color: var(--main-color);
}

/* Connect Tile */

.social-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 50px;
  color: var(--main-color);
}

.social-chip .fai {
  width: 1.05em;
  height: 1.05em;
}

.chip-github .fai   { color: #181717; }
.chip-linkedin .fai { color: #0A66C2; }
.chip-x .fai        { color: #000000; }
.chip-instagram .fai { color: #E4405F; }

.resume-chip {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.2);
  color: var(--secondary-color);
}

.social-chip:hover {
  border-color: rgba(var(--tone, var(--accent-rgb)), 0.45);
  background: rgba(var(--tone, var(--accent-rgb)), 0.06);
  transform: translateY(-1px);
}

/* Career Column */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Scroll box — shows the first entries, the rest scroll inside the tile */
.scroll-box {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--tile-border) transparent;
}

.scroll-box--short {
  max-height: 300px;
}

/* Fade the bottom edge while there's more to scroll */
.scroll-box.has-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
}

.scroll-box:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.35);
  outline-offset: 4px;
  border-radius: 6px;
}

.scroll-box::-webkit-scrollbar {
  width: 5px;
}

.scroll-box::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-box::-webkit-scrollbar-thumb {
  background: var(--tile-border);
  border-radius: 4px;
}

.scroll-box::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.scroll-hint {
  display: none;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-color);
  letter-spacing: 0.02em;
}

.scroll-box.has-more + .scroll-hint {
  display: block;
}

.role-highlight {
  display: block;
  color: var(--main-color);
  font-weight: 600;
  font-size: 0.88rem;
}

.role-org {
  display: block;
  font-size: 0.78rem;
  color: var(--secondary-color);
  margin-top: 0.1rem;
}

.timeline-item {
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--tile-border);
}

.item-points {
  margin-top: 0.55rem;
  margin-bottom: 0.8rem;
  padding-left: 1.1rem;
  color: var(--main-color);
  font-size: 0.87rem;
  line-height: 1.5;
}

.item-points li {
  margin-bottom: 0.35rem;
}

.item-points li::marker {
  color: rgb(var(--tone, var(--accent-rgb)));
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.item-role {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--main-color);
}

.item-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-color);
}

.item-company {
  font-size: 0.88rem;
  color: rgb(var(--tone, var(--accent-rgb)));
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-list span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(var(--tone, var(--accent-rgb)), 0.08);
  color: rgb(var(--tone, var(--accent-rgb)));
  padding: 2px 7px;
  border-radius: 4px;
}

/* Talks & Writing */
.compact-block {
  margin-bottom: 1.1rem;
}

.compact-block:last-child {
  margin-bottom: 0;
}

.block-title {
  font-size: 0.92rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.compact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.compact-list a {
  color: var(--main-color);
}

.compact-list a:hover {
  color: var(--secondary-color);
}

.link-subtle {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.icon-mini {
  font-size: 0.7em;
  opacity: 0.8;
}

.sub-video-link {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.yt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--body-color);
  background: rgba(28, 26, 23, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
}

.yt-badge .fai {
  color: #B4473F;
}

.yt-badge:hover {
  color: var(--main-color);
  background: rgba(28, 26, 23, 0.07);
}

.brand-logo-img {
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
}

.oracle-brand {
  height: 10px;
  width: auto;
  vertical-align: -1px;
}

.rounded-logo {
  border-radius: 4px;
  height: 16px;
  width: auto;
  vertical-align: middle;
}

.pub-logo-img {
  height: 12px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 50px;
  flex-shrink: 0;
  color: var(--muted-color);
  border: 1px solid var(--tile-border);
}

.type-pill.talk  { --pill: var(--amber); }
.type-pill.post  { --pill: var(--blue); }
.type-pill.event { --pill: var(--green); }

.type-pill.talk,
.type-pill.post,
.type-pill.event {
  color: rgb(var(--pill));
  background: rgba(var(--pill), 0.08);
  border-color: rgba(var(--pill), 0.2);
}

.pub-badge.cncf     { --pill: var(--blue); }
.pub-badge.kubeflow { --pill: var(--violet); }
.pub-badge.aaif     { --pill: var(--green); }
.pub-badge.hashnode { --pill: var(--blue); }
.pub-badge.linkedin { --pill: var(--blue); }

.pub-badge.cncf,
.pub-badge.kubeflow,
.pub-badge.aaif,
.pub-badge.hashnode,
.pub-badge.linkedin {
  color: rgb(var(--pill));
  background: rgba(var(--pill), 0.07);
  border-color: rgba(var(--pill), 0.2);
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 3px;
  color: var(--muted-color);
  background: rgba(28, 26, 23, 0.03);
  border: 1px solid var(--tile-border);
}

/* Command Palette Modal (Cmd + K) */
.cmd-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.cmd-modal.show {
  display: flex;
}

.cmd-box {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  width: 90%;
  max-width: 520px;
  border-radius: var(--tile-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.cmd-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--tile-border);
  color: var(--muted-color);
}

.cmd-input-wrapper input {
  background: none;
  border: none;
  outline: none;
  color: var(--main-color);
  font-family: var(--font-sans);
  font-size: 1rem;
  width: 100%;
}

.cmd-esc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--muted-color);
}

.cmd-results {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--main-color);
  cursor: pointer;
  transition: var(--transition);
}

.cmd-item:hover {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--secondary-color);
}

kbd {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8em;
}

/* Footer */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--tile-border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted-color);
}

.footer-container {
  max-width: var(--dashboard-max);
  margin: 0 auto;
  padding: 0 1.8rem;
}

/* ==========================================================================
   MOBILE HERO & BOTTOM NAV
   (hidden on desktop, shown on ≤ 768px)
   ========================================================================== */

.mobile-hero {
  display: none; /* hidden on desktop */
}

/* ── Floating Dock (all screen sizes) ── */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem;
  background: var(--tile-bg);
  background: color-mix(in srgb, var(--tile-bg) 80%, transparent);
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(28, 26, 23, 0.096), 0 2px 6px rgba(28, 26, 23, 0.036);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.bn-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--body-color);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bn-tab .fai {
  width: 1rem;
  height: 1rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bn-tab:hover {
  color: var(--main-color);
  background: rgba(var(--accent-rgb), 0.08);
}

.bn-tab:hover .fai {
  transform: translateY(-2px) scale(1.12);
}

.bn-tab.active {
  background: var(--secondary-color);
  color: #FFF;
}

.bn-tab:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Keep content clear of the dock */
.footer {
  padding-bottom: 6rem;
}

/* ==========================================================================
   RESPONSIVE BREAKDOWN
   ========================================================================== */

/* Tablet wide: 2-col */
@media (max-width: 1100px) {
  .dashboard-wrapper {
    grid-template-columns: 280px 1fr;
    gap: 1.1rem;
  }
  .col-right {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
  }
}

/* ≤ 768px: Full mobile layout */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  /* ── Hide desktop-only chrome ── */
  .top-utility-bar {
    display: none;
  }

  /* ── Mobile Hero ── */
  .mobile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 0.75rem 1rem;
    background: var(--tile-bg);
    border-bottom: 1px solid var(--tile-border);
    box-shadow: 0 2px 16px rgba(28, 26, 23, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mh-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1;
  }

  .mh-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 10%;
    border: 2px solid var(--secondary-color);
    flex-shrink: 0;
  }

  .mh-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .mh-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--main-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mh-role {
    font-size: 0.72rem;
    color: var(--body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mh-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    color: #5E8A6E;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .mh-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5E8A6E;
    box-shadow: 0 0 5px #5E8A6E;
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
  }

  .mh-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .mh-btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.85rem;
    border-radius: 50px;
    background: var(--secondary-color);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.3);
  }

  .mh-btn-resume:hover {
    opacity: 0.88;
    transform: translateY(-1px);
  }

  .mh-utility {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .mh-utility .utility-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    justify-content: center;
    border-radius: 50%;
  }

  /* ── Dashboard: single column ── */
  .dashboard-wrapper {
    grid-template-columns: 1fr;
    padding: 0.9rem;
    padding-bottom: 0.9rem;
    gap: 0.9rem;
    margin-top: 0;
  }

  .col-left, .col-center, .col-right {
    width: 100%;
  }

  .col-right {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .scroll-box {
    max-height: min(540px, 70vh);
  }

  .scroll-box--short {
    max-height: 340px;
  }

  /* ── Hide duplicate desktop profile content ── */
  .profile-tile .avatar-box {
    height: 240px;
  }

  /* ── Dock: compact, icon over label ── */
  .bottom-nav {
    width: calc(100% - 1.5rem);
    max-width: 340px;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .bn-tab {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.3rem;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .bn-tab .fai {
    width: 1.05rem;
    height: 1.05rem;
  }

  /* Tile adjustments on mobile */
  .bento-tile {
    padding: 1.1rem;
    border-radius: 16px;
  }

  .tile-heading {
    font-size: 1.25rem;
  }

  .item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .event-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .type-pill {
    align-self: flex-start;
  }

}

/* Small phones ≤ 480px */
@media (max-width: 480px) {
  .dashboard-wrapper {
    padding: 0.7rem;
    gap: 0.8rem;
  }

  .profile-tile .avatar-box {
    height: 200px;
    border-radius: 14px;
  }

  .profile-title {
    font-size: 1.5rem;
  }

  .bento-tile {
    padding: 1rem;
    border-radius: 14px;
  }

  .tile-heading {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
  }

  .social-chips {
    gap: 0.35rem;
  }

  .social-chip {
    padding: 6px 11px;
    font-size: 0.8rem;
  }

  .tag-list span {
    font-size: 0.67rem;
    padding: 2px 5px;
  }

  .compact-list {
    font-size: 0.82rem;
  }

  .pub-badge {
    font-size: 0.63rem;
  }

  .footer {
    padding: 1rem 0 5.5rem;
    font-size: 0.75rem;
  }

  .mh-name {
    font-size: 0.92rem;
  }

  .mh-role {
    font-size: 0.68rem;
  }

  .mh-avatar {
    width: 40px;
    height: 40px;
  }

  .mh-btn-resume {
    font-size: 0.7rem;
    padding: 0.32rem 0.7rem;
  }
}

/* ==========================================================================
   SUB-PAGES (/talks/, /travel/)
   ========================================================================== */

.subpage-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.8rem 1.8rem;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.subpage-intro {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.subpage-back {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-color);
}

.subpage-back:hover {
  color: var(--secondary-color);
}

.subpage-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--main-color);
  margin-bottom: 0.6rem;
}

.subpage-lede {
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}

.subpage-intro .chip-instagram {
  align-self: flex-start;
}

.subpage-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.subpage-cta {
  justify-content: center;
  padding: 0.6rem 1rem;
}

/* ── Talks page ── */
.talks-intro {
  position: sticky;
  top: 1.5rem;
}

.logo-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.logo-strip li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  background: var(--tile-bg);
}

.logo-strip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  background: var(--tile-border);
  margin-bottom: 0.3rem;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-play {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.video-play .fai {
  width: 20px;
  height: 20px;
  color: #E33B2E;
  transition: transform 0.25s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

.video-card:hover .video-play .fai {
  transform: scale(1.1);
}

.video-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--main-color);
}

.video-card:hover .video-title {
  color: rgb(var(--tone, var(--accent-rgb)));
}

.entry-list {
  list-style: none;
}

.entry-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--tile-border);
}

.entry-row:first-child {
  padding-top: 0;
}

.entry-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.entry-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
}

.entry-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.entry-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.entry-title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--main-color);
}

a.entry-title:hover {
  color: rgb(var(--tone, var(--accent-rgb)));
}

.entry-sub {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted-color);
}

.entry-sub-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.entry-dot {
  opacity: 0.6;
}

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 50px;
  border: 1px solid var(--tile-border);
  color: var(--body-color);
}

.entry-link .fai {
  color: #0A66C2;
}

.entry-link--video .fai {
  color: #E33B2E;
}

.entry-link:hover {
  border-color: rgba(var(--tone, var(--accent-rgb)), 0.45);
  color: var(--main-color);
}

.entry-arrow {
  color: var(--muted-color);
  font-size: 0.8rem;
}

.entry-row:hover .entry-arrow {
  color: rgb(var(--tone, var(--accent-rgb)));
}

/* ── Travelogue page ── */
.travel-layout {
  grid-template-columns: 340px minmax(0, 1fr);
}

.travel-layout .travel-photos {
  grid-column: 1 / -1;
}

.visited-map svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-land {
  fill: #E8E3DA;
  stroke: var(--tile-bg);
  stroke-width: 0.5;
}

.map-visited path {
  fill: rgb(var(--tone, var(--accent-rgb)));
  stroke: var(--tile-bg);
  stroke-width: 0.4;
  transition: fill 0.2s ease;
}

.map-visited path.is-hot {
  fill: var(--accent-warm);
}

.map-pins circle {
  fill: var(--tile-bg);
  stroke: rgb(var(--tone, var(--accent-rgb)));
  stroke-width: 1.6;
  pointer-events: none;
  transition: r 0.2s ease, stroke 0.2s ease;
}

.map-pins circle.is-hot {
  r: 5;
  stroke: var(--accent-warm);
}

.country-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--main-color);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  transition: var(--transition);
}

.country-chip.is-hot {
  border-color: var(--accent-warm);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid a {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--tile-border);
}

.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-grid a:hover img {
  transform: scale(1.04);
}

.photo-grid figcaption {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin-top: 0.4rem;
}

@media (max-width: 900px) {
  .subpage-wrapper,
  .travel-layout {
    grid-template-columns: 1fr;
  }

  .talks-intro {
    position: static;
  }

  .logo-strip {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 768px) {
  .subpage-wrapper {
    padding: 0.9rem;
    gap: 0.9rem;
  }

  .subpage-stack {
    gap: 0.9rem;
  }

  .subpage-title {
    font-size: 1.8rem;
  }

  .logo-strip {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .entry-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.75rem;
  }

  .entry-logo {
    width: 38px;
    height: 38px;
  }

  .entry-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .entry-arrow {
    display: none;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 0.7rem;
  }
}
