.bg-orb {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.26;
  pointer-events: none;
}

.orb-a {
  top: 20%;
  left: -5rem;
  background: #b31b38;
}

.orb-b {
  top: 68%;
  right: -5rem;
  background: #2867c2;
}

body.menu-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  transition: opacity 220ms ease, filter 220ms ease;
}

body.menu-open .page-shell {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 30;
}

body.menu-open .menu-overlay {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(360px, 88vw);
  height: 100vh;
  background: linear-gradient(165deg, #0f1320, #161e2f);
  border-right: 1px solid rgba(120, 138, 177, 0.38);
  transform: translateX(-102%);
  transition: transform 220ms ease;
  z-index: 40;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.menu-open .sidebar {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-head p {
  color: #d8e2fd;
  font-weight: 600;
}

.menu-close {
  border: 0;
  background: transparent;
  color: #d8e2fd;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease;
}

.menu-close:hover {
  color: #ffffff;
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav a:hover {
  border-color: var(--accent-soft);
  background: rgba(229, 77, 103, 0.13);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 15, 20, 0.78);
  border-bottom: 1px solid rgba(59, 70, 95, 0.5);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.menu-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #d8e2fd;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  cursor: pointer;
  transition: color 160ms ease;
}

.menu-toggle:hover {
  color: #ffffff;
}

.menu-toggle span {
  width: 1rem;
  height: 2px;
  background: currentColor;
}

.brand {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
}

.social-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: #d8e2fd;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.social-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.social-icon.email-icon svg {
  width: 1.34rem;
  height: 1.34rem;
}

.social-icon img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  display: block;
}

.social-icon:hover {
  border-color: var(--accent-soft);
  background: rgba(229, 77, 103, 0.13);
  color: #fff;
}

.social-icon.linkedin-image,
.social-icon.github-image {
  padding: 0;
}

.social-icon.linkedin-image {
  overflow: hidden;
  border-color: #0274b3;
  background: #0274b3;
}

.social-icon.linkedin-image img {
  width: 71%;
  height: 71%;
  object-fit: contain;
  border-radius: 0;
}

.social-icon.linkedin-image:hover {
  border-color: var(--accent-soft);
  background: #0274b3;
}

.social-icon.github-image {
  overflow: hidden;
}

.social-icon.github-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  filter: brightness(0) invert(1);
}

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1rem 1rem;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-head h2 {
  margin-bottom: 0;
}

.see-more {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 170ms ease, border-color 170ms ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
}

.card-previewed {
  overflow: hidden;
}

.card,
.about-card,
.about-story,
.draft-card,
.post-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.current,
.tags {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: #b4bfd9;
}

.links {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.8rem;
}

.links a {
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  max-width: 1100px;
  margin: 3rem auto 1.5rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.draft-main,
.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1rem 1rem;
}

.page-intro {
  margin-bottom: 1rem;
  color: #d8e2fd;
}

.blog-list {
  display: grid;
  gap: 1rem;
}

.notes-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #dbe2f3;
  display: grid;
  gap: 0.5rem;
}

.cv-page {
  display: grid;
  gap: 1rem;
}

.cv-header-card {
  padding: 1.35rem;
}

.cv-kicker {
  margin-bottom: 0.55rem;
  color: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-contact-line {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #c7d2ec;
  font-size: 0.95rem;
}

.cv-contact-line a {
  color: #f1b3c1;
  text-decoration: none;
}

.cv-contact-line a:hover {
  color: #ffd0d8;
}

.cv-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cv-btn {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cv-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  background: rgba(229, 77, 103, 0.13);
}

.cv-btn-secondary {
  background: rgba(40, 103, 194, 0.17);
}

.cv-section {
  padding: 1.15rem;
}

.cv-section h2 {
  margin-bottom: 0.85rem;
}

.cv-entry + .cv-entry {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(120, 136, 172, 0.3);
}

.cv-entry h3 {
  margin-bottom: 0.35rem;
  font-size: 1.03rem;
}

.cv-entry h3 a {
  color: #f4d7df;
  text-decoration: none;
}

.cv-entry h3 a:hover {
  color: #ffd0d8;
}

.cv-subhead {
  margin-bottom: 0.65rem;
  color: #a9b7d5;
  font-size: 0.92rem;
}

.cv-bullets {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
  color: #dde4f6;
}

.cv-chip-grid {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cv-chip-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cv-chip {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  color: #dce4f6;
  font-size: 0.9rem;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.cv-chip.has-tooltip {
  cursor: help;
}

.cv-chip.has-tooltip:hover,
.cv-chip.has-tooltip:focus-visible {
  border-color: rgba(229, 77, 103, 0.72);
  background: rgba(229, 77, 103, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.cv-skill-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  width: min(24rem, calc(100vw - 1.5rem));
  border: 1px solid rgba(127, 144, 186, 0.5);
  border-radius: 0.68rem;
  background: linear-gradient(160deg, rgba(8, 12, 21, 0.97), rgba(18, 24, 38, 0.97));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color: #eaf0ff;
  padding: 0.62rem 0.74rem;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition: opacity 120ms ease, transform 120ms ease;
}

.cv-skill-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cv-skill-tooltip-title {
  margin: 0 0 0.42rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff4f7;
}

.cv-skill-tooltip-row {
  margin: 0;
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  column-gap: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.36;
  color: #d6deef;
}

.cv-skill-tooltip-row + .cv-skill-tooltip-row {
  margin-top: 0.24rem;
}

.cv-skill-tooltip-row span {
  color: #f3a9ba;
  font-weight: 600;
}

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

  .section {
    padding-top: 8rem;
  }

  .social-icon {
    width: 2.1rem;
    height: 2.1rem;
  }

  .cv-chip-grid,
  .cv-chip-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Fixed header + scroll-revealed identity */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.page-shell {
  padding-top: 2rem;
}

.nav-left {
  min-width: 0;
}

.header-identity {
  display: inline-flex;
  align-items: baseline;
  margin-left: 0.45rem;
  gap: 0.46rem;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.header-identity .header-name {
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  color: #edf1ff;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.header-identity .header-role {
  color: #a7b2cb;
  font-size: 0.84rem;
  font-weight: 500;
}

.header-identity.role-hidden .header-role {
  display: none;
}

.header-identity.role-hidden {
  gap: 0;
}

.header-identity.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .header-identity .header-name {
    font-size: 0.94rem;
  }

  .header-identity .header-role {
    font-size: 0.74rem;
  }

  .header-identity {
    gap: 0.35rem;
  }
}
