/* ═══════════════════════════════════════════
   CV – Game Developer v3
   Font: Rajdhani (headers) / Inter (body)
   Palette: Midnight Slate + Gaming Gold + Cyan
═══════════════════════════════════════════ */

:root {
  --sidebar-bg:   #1a2535;     /* deep navy */
  --sidebar-bg2:  #0f1923;     /* darker accent for depth */
  --accent:       #E2B714;     /* gaming gold */
  --accent2:      #38bdf8;     /* cyan glow */
  --dark:         #0d1117;
  --charcoal:     #374151;
  --body-bg:      #c8cbd0;
  --sidebar-text: #e8eaf0;
  --muted:        #6b7280;
  --page-bg:      #ffffff;
}

/* ── Reset ── */
* { box-sizing: border-box; }

/* ── Minimal page scrollbar (Firefox + WebKit) ── */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 37, 53, 0.32) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(26, 37, 53, 0.28);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(226, 183, 20, 0.7); }
::-webkit-scrollbar-corner { background: transparent; }

body {
  background: var(--body-bg);
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

/* ── Page Shell ── */
.page {
  width:    210mm;
  height:   297mm;
  margin:   10mm auto;
  background: var(--page-bg);
  overflow: hidden;
  position: relative;
}

/* ══════════════════════════════════════════
   HALFTONE OVERLAY – spans full page width
   (sidebar + main), fades in from bottom
══════════════════════════════════════════ */
.main-content {
  background-color: #ffffff;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Ambient radial glow & architectural grid with 30% soft blur */
.main-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #ffffff;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    radial-gradient(circle 500px at 100% 120px, rgba(213, 197, 255, 0.35), transparent 70%),
    radial-gradient(circle 400px at 50% 0%, rgba(56, 189, 248, 0.08), transparent 70%);
  background-size: 3.5rem 2.5rem, 3.5rem 2.5rem, auto, auto;
  filter: blur(1.2px); /* Soft blur to smooth out the background grid & glow */
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
}

/* ── Sidebar with layered cosmic depth & floating elevation ── */
.sidebar {
  background: 
    radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 75%, rgba(226, 183, 20, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(15, 25, 35, 0.95) 0%, transparent 60%),
    linear-gradient(165deg, #1d2b3e 0%, var(--sidebar-bg) 35%, var(--sidebar-bg2) 75%, #080d14 100%);
  color: var(--sidebar-text);
  height: 100%;
  position: relative;
  z-index: 10; /* Elevated above main content */
  /* Deep floating drop shadow casting over main content (NO borders) */
  box-shadow: 
    12px 0 32px -4px rgba(10, 18, 30, 0.35),
    4px 0 12px -2px rgba(10, 18, 30, 0.25);
  transition: box-shadow 0.5s ease;
}

/* 
   Aceternity Background-Gradient Inspiration:
   Continuous animated multi-radial gradient aura casting purely from the sidebar's right edge over the main content.
   left: 100% ensures 0% light bleeds into the sidebar interior; it projects strictly outwards onto the main.
*/
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 48px;
  background: 
    radial-gradient(circle at 0% 20%, rgba(56, 189, 248, 0.45), transparent 75%),
    radial-gradient(circle at 0% 48%, rgba(123, 97, 255, 0.35), transparent 75%),
    radial-gradient(circle at 0% 72%, rgba(226, 183, 20, 0.4), transparent 75%),
    radial-gradient(circle at 0% 95%, rgba(0, 204, 177, 0.4), transparent 75%);
  background-size: 180% 180%;
  filter: blur(14px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
  animation: gradient-glow-drift 8s ease infinite alternate;
  will-change: background-position, opacity;
}

/* Hover effect: 30% aura bloom over main content */
.sidebar:hover::after {
  opacity: 0.30;
  filter: blur(16px);
}

@keyframes gradient-glow-drift {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* subtle corner glow behind photo */
.sidebar::before {
  content: "";
  position: absolute;
  top: -50px; left: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(56,189,248,0.18), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
}

/* ── Meteors Effect (sidebar shooting stars with soft blur) ── */
.meteors-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  filter: blur(0.35px); /* Soft blur effect for atmospheric depth */
}

.meteor {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 1.5px;
  width: 1.5px;
  border-radius: 9999px;
  background-color: #e0f2fe; /* Soft luminous core */
  box-shadow: 0 0 6px 1.5px rgba(56, 189, 248, 0.65), 0 0 12px 3px rgba(56, 189, 248, 0.25);
  transform: rotate(215deg);
  animation: meteor-effect 6s linear infinite;
  opacity: 0;
  filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.8));
}

.meteor::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.85) 0%, rgba(56, 189, 248, 0.2) 65%, transparent 100%);
  filter: blur(0.2px);
}

@keyframes meteor-effect {
  0% {
    transform: rotate(215deg) translateX(0);
    opacity: 0.85;
  }
  65% {
    opacity: 0.85;
  }
  100% {
    transform: rotate(215deg) translateX(-450px);
    opacity: 0;
  }
}

/* Ensure sidebar content stays elevated above meteors */
.sidebar > *:not(.meteors-container) {
  position: relative;
  z-index: 2;
}

/* ── Profile Photo ── */
.profile-photo-container {
  width:  36mm;
  height: 36mm;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(226,183,20,0.18), 0 6px 18px rgba(0,0,0,0.4);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Name & Badges ── */
.name-heading {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 17px;
  color: #ffffff;
  margin-bottom: 4px;
}

.job-badge {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  text-decoration: none !important;
  font-family: 'Rajdhani', monospace, sans-serif;
  font-weight: 700;
  font-size: 9.5px;
  padding: 2px 10px;
  border-radius: 3px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
  min-width: 110px;
  text-align: center;
}

.job-badge:hover {
  background: rgba(226, 183, 20, 0.1);
  box-shadow: 0 0 10px rgba(226, 183, 20, 0.35);
  border-color: #fff;
  color: #fff !important;
}

/* Typewriter block caret — blinks while typing and stays after */
.badge-caret {
  display: inline-block;
  margin-left: 3px;
  color: var(--accent);
  font-size: 0.95em;
  line-height: 1;
  vertical-align: baseline;
  animation: badgeCaretBlink 1.06s steps(1) infinite;
}
.job-badge:hover .badge-caret { color: #fff; }
@keyframes badgeCaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Section Title (sidebar) ── */
.sidebar-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
  border-bottom: 1px solid rgba(56,189,248,0.25);
  padding-bottom: 4px;
  margin-bottom: 10px;
  display: block;
}

/* ── Interactive ContactCards Component ── */
.contact-cards-wrapper {
  position: relative;
  z-index: 20;
}

/* Copy Email Button */
.copy-email-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  user-select: none;
}

.copy-email-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent2);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.copy-email-btn:active {
  transform: scale(0.98);
}

.copy-email-btn .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.copy-email-btn .copied-text {
  position: absolute;
  opacity: 0;
  transform: translateY(10px);
  color: #34d399;
  font-weight: 600;
}

.copy-email-btn.is-copied .idle-text {
  opacity: 0;
  transform: translateY(-10px);
}

.copy-email-btn.is-copied .copied-text {
  opacity: 1;
  transform: translateY(0);
}

.copy-email-btn .btn-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Dock of Contact Links */
.contact-links-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(15, 25, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
}

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

.contact-link-pill {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text);
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none !important;
}

.contact-link-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.contact-link-wrapper:hover .contact-link-pill {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent2);
}

.contact-link-wrapper:hover .contact-link-pill svg {
  fill: var(--accent2);
}

/* Floating Popover Cards — appear ABOVE the dock, clamped strictly within sidebar */
.contact-popover-card {
  position: fixed;   /* Use fixed so it escapes clip contexts but stays visible */
  background: #0d1b2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 11px;
  width: 170px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 9999;
  text-align: left;
  transform: translateY(4px) scale(0.96);
}

/* Caret pointing DOWNWARDS toward the icon */
.contact-popover-card::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: var(--caret-left, 20px);
  width: 10px;
  height: 10px;
  background: #0d1b2a;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
}

.contact-popover-card.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Live cards (GitHub + X) — wider, heatmap style */
.contact-popover-card.live-card {
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 0 0 2px;
  overflow: visible;
  background: #0d1b2a;
}
.contact-popover-card.github-card {
  width: 320px;
}
.contact-popover-card.x-card {
  width: 260px;
}
.live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 8px;
}
.live-id { min-width: 0; flex: 1; }
.live-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-handle {
  font-size: 11px;
  color: rgba(232,234,240,0.6);
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39d353;
  box-shadow: 0 0 6px #39d353;
  display: inline-block;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-follow {
  font-size: 11px;
  font-weight: 700;
  color: #0d1b2a;
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.live-follow:hover { background: var(--accent2); color: #0d1b2a; }
.live-summary {
  padding: 0 12px 8px;
  font-size: 11px;
  color: rgba(232,234,240,0.85);
}
.live-summary b { color: #fff; }

/* Heatmap — full year fits card, no side-scroll (fluid grid) */
.heatmap-scroller {
  overflow: hidden;
  padding: 2px 10px 4px;
  position: relative;
}
.heatmap-canvas { width: 100%; min-width: 0; position: relative; }
.heatmap-months {
  position: relative;
  height: 12px;
  font-size: 8px;
  color: rgba(232,234,240,0.55);
  margin-left: 24px;
  margin-bottom: 2px;
  overflow: hidden;
  white-space: nowrap;
}
.heatmap-months span { position: absolute; top: 0; }
.heatmap-body { display: flex; gap: 4px; }
.heatmap-weekdays {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-size: 7px;
  color: rgba(232,234,240,0.45);
  width: 20px;
  flex-shrink: 0;
  padding: 1px 0;
}
.heatmap-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
}
.heatmap-week { display: contents; }
.heatmap-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 1.5px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}
.heatmap-cell:hover, .heatmap-cell:focus-visible {
  outline: 1px solid var(--accent2);
  transform: scale(1.6);
  z-index: 2;
}
.heatmap-cell[data-l="1"] { background: #0e4429; border-color: rgba(57,211,83,0.2); }
.heatmap-cell[data-l="2"] { background: #006d32; }
.heatmap-cell[data-l="3"] { background: #26a641; }
.heatmap-cell[data-l="4"] { background: #39d353; box-shadow: 0 0 4px rgba(57,211,83,0.5); }
.heatmap-grid.dim-active .heatmap-cell:not(.dim-keep) { opacity: 0.25; }
.heatmap-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 12px 10px;
  font-size: 9px;
  color: rgba(232,234,240,0.55);
}
.heatmap-swatches { display: inline-flex; gap: 3px; }
.heatmap-swatches i {
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
  background: rgba(255,255,255,0.07);
  display: inline-block;
  cursor: pointer;
}
.heatmap-swatches i[data-l="1"] { background: #0e4429; }
.heatmap-swatches i[data-l="2"] { background: #006d32; }
.heatmap-swatches i[data-l="3"] { background: #26a641; }
.heatmap-swatches i[data-l="4"] { background: #39d353; }
.heatmap-tip {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  background: #161e2a;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 5;
  pointer-events: none;
}
.heatmap-tip small { color: rgba(232,234,240,0.65); display: block; font-size: 9px; }

/* X card specifics */
.x-banner {
  height: 64px;
  background: linear-gradient(135deg, #0f1923 0%, #1d9bf0 130%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px 10px 0 0;
  position: relative;
  overflow: hidden;
}
.x-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.x-banner-x { color: rgba(255,255,255,0.85); font-size: 22px; font-weight: 800; }
.x-head {
  padding-top: 0;
  padding-bottom: 2px;
  margin-top: -14px;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}
.x-head .live-follow { position: relative; z-index: 2; }
.x-avatar {
  width: 40px;
  height: 40px;
  border: 2px solid #0d1b2a;
  background: #000;
  position: relative;
}
.x-avatar img { position: absolute; inset: 0; z-index: 1; }
.x-avatar .x-avatar-x { position: relative; z-index: 0; }
.x-avatar-fallback img { display: none; }
.x-card .live-name { padding: 0 12px; font-size: 14px; }
.x-card .live-handle { padding: 0 12px; }
.x-bio { padding: 6px 12px 2px; font-size: 11px; line-height: 1.45; color: rgba(232,234,240,0.88); }
.x-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 4px 12px 0; font-size: 10px; color: rgba(232,234,240,0.6); }
.x-counts { padding-bottom: 12px; }
.x-counts b { color: #fff; }

.popover-header {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.popover-body {
  font-size: 11px;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 2px;
}

.popover-sub {
  font-size: 9px;
  color: rgba(232, 234, 240, 0.65);
  line-height: 1.25;
}


.gh-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gh-avatar-lg { width: 38px; height: 38px; }

.gh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Legacy mini-grid kept for fallback (new heatmap uses .heatmap-grid) */
.gh-grid {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.gh-cell {
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.07);
}

.gh-cell.lvl-1 { background: rgba(14, 68, 41, 0.9); }
.gh-cell.lvl-2 { background: #006d32; }
.gh-cell.lvl-3 { background: #26a641; }
.gh-cell.lvl-4 { background: #39d353; }

/* ── Skill Categories ── */
.skill-category {
  background: rgba(255,255,255,0.035);
  border-left: 2px solid rgba(226,183,20,0.6);
  padding: 8px 10px 9px;
  border-radius: 4px;
}

.skill-cat-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 7px;
}

/* Icon Grid - spacious breathing room */
.skills-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
  padding: 4px 2px;
}

.skill-icon-link {
  text-decoration: none !important;
  display: inline-block;
  color: inherit;
}

.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 32px;
  padding: 1px 2px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
  will-change: transform;
}

.skill-icon-item i {
  font-size: 19px;
  color: var(--sidebar-text);
  transition: color 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.skill-icon-link:hover .skill-icon-item i {
  color: var(--accent);
}

.skill-icon-link:hover .skill-icon-item span {
  color: #ffffff;
}

.skill-icon-item span {
  font-size: 8px;
  color: rgba(232,234,240,0.75);
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: visible;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}

/* Fallback pure CSS scale for hover - only scale the icon, text stays fixed */
.skills-icon-grid:not(.dock-active) .skill-icon-link:hover .skill-icon-item i {
  transform: scale(1.35) translateY(-3px);
}

/* ── Soft Skills ── */
.soft-skills-list li {
  font-size: 10.5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.soft-icon {
  color: var(--accent2);
  font-size: 10px;
  flex-shrink: 0;
}

/* ── Language Bar ── */
.progress-mini {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.progress-bar-mini {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
}

/* ════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════ */
.content-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sidebar-bg);
  border-bottom: 1.5px solid var(--sidebar-bg);
  padding-bottom: 3px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--sidebar-bg);
  color: var(--accent);
  border-radius: 4px;
  flex-shrink: 0;
}

.title-icon svg {
  fill: var(--accent);
}

.text-justify {
  text-align: justify;
  font-size: 11px;
  line-height: 1.5;
}

.text-highlight {
  color: var(--sidebar-bg);
}

.text-accent {
  color: var(--sidebar-bg);
}

/* ── Education Timeline (inspired by shadcn Timeline) ── */
.edu-timeline {
  position: relative;
  padding-left: 0;
}

.edu-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
}

.edu-item:last-child {
  margin-bottom: 0;
}

/* Vertical line separator */
.edu-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: -14px;
  width: 2px;
  background: rgba(26, 37, 53, 0.15);
}

.edu-item:last-child::before {
  display: none;
}

/* Node indicator dot */
.edu-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--sidebar-bg);
  background: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(26, 37, 53, 0.08);
}

/* Current / ongoing item highlight */
.edu-item.current::before {
  background: linear-gradient(to bottom, var(--accent2), rgba(26, 37, 53, 0.15));
}

.edu-item.current::after {
  border-color: var(--accent2);
  background: var(--accent2);
  outline: 2px solid rgba(56, 189, 248, 0.25);
  outline-offset: 2px;
}

.edu-item.completed::after {
  background: var(--sidebar-bg);
}

.edu-item h6 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.edu-item .text-accent {
  font-size: 11px;
}

.edu-item .small {
  font-size: 11.5px !important;
  line-height: 1.45;
}

/* ── Projects Timeline ── */
.projects-timeline {
  padding-left: 0;
}

.project-item {
  position: relative;
  padding-left: 18px;
  border-left: 2px solid rgba(26,37,53,0.15);
  margin-bottom: 20px;
}

.project-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(226,183,20,0.3);
}

.project-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--sidebar-bg);
}

.project-title-link {
  color: var(--sidebar-bg) !important;
  text-decoration: none !important;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.project-title-link:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent);
}

.project-type {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
}

.proj-badge {
  font-size: 9px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: rgba(55,65,81,0.08);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
}

.proj-badge.ongoing {
  color: var(--accent2);
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.3);
}

.project-desc {
  font-size: 11.5px;
  font-style: italic;
  color: #555;
  margin-bottom: 3px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 5px;
}

.link-icon {
  width: 12px;
  height: 12px;
  fill: var(--accent);
  flex-shrink: 0;
}

.project-url {
  color: var(--sidebar-bg) !important;
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px dashed rgba(26,37,53,0.35);
}

.project-link-row {
  gap: 12px;
}

/* ── Project tech icon strip ── */
.tech-icon-strip {
  display: inline-flex;
  align-items: flex-end;
  gap: 11px;
  padding: 3px 0;
}

.tech-icon-link {
  text-decoration: none !important;
  color: inherit !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform-origin: bottom center;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.tech-icon-link:hover {
  transform: scale(1.4) translateY(-2px);
}

.tech-icon-link:hover i,
.tech-icon-link:hover .tech-custom-icon {
  color: var(--accent) !important;
  opacity: 1 !important;
}

.tech-icon-strip i {
  font-size: 13.5px;
  color: var(--sidebar-bg);
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: color 0.2s, opacity 0.2s;
}

.tech-custom-icon {
  width: 14px;
  height: 14px;
  color: var(--sidebar-bg);
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -1px;
  transition: color 0.2s, opacity 0.2s;
}

.project-url:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent);
}

.tech-stack {
  font-size: 11px;
  color: var(--charcoal);
  font-weight: 500;
  margin-bottom: 5px;
}

.project-bullets {
  padding-left: 14px;
  font-size: 11.5px;
  line-height: 1.45;
  margin-bottom: 0;
  list-style: none;
}

.project-bullets li {
  margin-bottom: 2px;
  position: relative;
}

.project-bullets li::before {
  content: "▸";
  position: absolute;
  left: -12px;
  color: var(--accent);
  font-size: 10px;
  top: 1px;
}

/* ── Print Contact List (Hidden on screen, auto shows on print / PDF) ── */
.print-contact-list {
  display: none;
}

.contact-list li {
  font-size: 11px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  color: var(--sidebar-text);
}

.contact-list i {
  width: 20px;
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
}

/* ── Gameplay Demo Pill Button ── */
.demo-btn {
  background: rgba(226, 183, 20, 0.12);
  border: 1px solid rgba(226, 183, 20, 0.4);
  color: var(--accent);
  font-family: 'Rajdhani', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.demo-btn:hover {
  background: var(--accent);
  color: var(--sidebar-bg2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(226, 183, 20, 0.35);
}

.demo-btn svg {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FPS COUNTER – Tiny Game HUD in top-right corner
═══════════════════════════════════════════════════════════════ */

#fpsCounter {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(13, 27, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 8px rgba(56, 189, 248, 0.15);
  color: var(--sidebar-text);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.fps-label {
  color: rgba(232, 234, 240, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fps-value {
  font-size: 11px;
  font-weight: 700;
  min-width: 2.5ch;
  text-align: right;
  transition: color 0.2s ease;
}

.fps-value.fps-good { color: #22c55e; }
.fps-value.fps-warn { color: #facc15; }
.fps-value.fps-bad { color: #ef4444; }

.fps-divider {
  color: rgba(56, 189, 248, 0.4);
  margin: 0 2px;
}

.ms-label {
  color: rgba(232, 234, 240, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ms-value {
  font-size: 11px;
  font-weight: 700;
  min-width: 3.5ch;
  text-align: right;
  transition: color 0.2s ease;
}

.ms-value.ms-good { color: #22c55e; }
.ms-value.ms-warn { color: #facc15; }
.ms-value.ms-bad { color: #ef4444; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #fpsCounter { display: none !important; }
}

/* ── 3D Tilt Project Cards ── */
.project-item {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  border-radius: 6px;
  padding: 8px 10px 8px 18px;
  margin-left: -10px;
  margin-right: -6px;
}

.project-item.is-tilted {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(56, 189, 248, 0.12);
}

/* ── Gameplay Demo Modal ── */
.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.demo-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal-card {
  background: #0d1b2a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-modal-backdrop.is-open .demo-modal-card {
  transform: scale(1) translateY(0);
}

.demo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 25, 35, 0.7);
}

.demo-modal-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.8px;
  margin: 0;
}

.demo-modal-close {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.demo-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.demo-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-modal-badge {
  font-family: 'Rajdhani', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent2);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.demo-modal-body {
  padding: 14px 16px;
}

.demo-screen-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-screen-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Video player inside the demo modal */
.demo-screen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* shown by JS when demo.src is set */
  background: #000;
}

/* GIF img fallback */
#demoGifImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* YouTube mount fills the demo screen */
#demoScreenYt { position: absolute; inset: 0; }
.demo-yt-mount { position: absolute; inset: 0; }
.demo-yt-mount iframe { width: 100% !important; height: 100% !important; border: 0; display: block; }

.demo-modal-desc {
  margin-top: 10px;
  font-size: 12px;
  color: #c7cbd4;
  line-height: 1.45;
}

.demo-modal-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.demo-tag {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent2);
  font-size: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
}

/* YouTube-style seek bar in page theme */
.video-seek {
  width: calc(100% - 20px);
  margin: 4px 10px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  background: transparent;
  cursor: pointer;
  --seek-pct: 0%;
}
.video-seek.is-hidden { display: none; }
.video-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--seek-pct), rgba(255, 255, 255, 0.22) var(--seek-pct));
}
.video-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  margin-top: -4px;
  box-shadow: 0 0 8px rgba(226, 183, 20, 0.7);
}
.video-seek::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}
.video-seek::-moz-range-progress {
  height: 4px;
  border-radius: 99px;
  background: var(--accent);
}
.video-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(226, 183, 20, 0.7);
}

/* YouTube failure fallback card (e.g. error 153, file:// embeds) */
.yt-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: #060b11;
}
.yt-fallback-code {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fca5a5;
}
.yt-fallback-why {
  font-size: 11.5px;
  color: rgba(232, 234, 240, 0.7);
  line-height: 1.55;
  max-width: 420px;
}
.yt-fallback-link {
  display: inline-block;
  margin-top: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #1a2535;
  background: var(--accent);
  border-radius: 20px;
  padding: 7px 20px;
  text-decoration: none;
}
.yt-fallback-link:hover { filter: brightness(1.1); color: #1a2535; }

/* ═══════════════════════════════════════════
   VideoPlayer-Style Modal Frame
   Corner brackets, scanlines, control bar
═══════════════════════════════════════════ */

.video-player-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: #0d1b2a;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.15), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* Corner brackets */
.video-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent2);
  opacity: 0.8;
  pointer-events: none;
  z-index: 10;
}
.video-corner-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.video-corner-tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.video-corner-bl { bottom: 56px; left: 8px; border-right: none; border-top: none; }
.video-corner-br { bottom: 56px; right: 8px; border-left: none; border-top: none; }

/* Scanline overlay */
.video-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}

/* Screen container */
.demo-screen-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 0;
  position: relative;
  z-index: 1;
}

.demo-screen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
}

.demo-screen-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Controls bar */
.video-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(13, 27, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 16px;
  z-index: 20;
}

.video-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
}

/* YT-style time readout docked at the row's right edge */
.video-times {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(232, 234, 240, 0.9);
  white-space: nowrap;
  user-select: none;
}
.video-times-sep { color: rgba(232, 234, 240, 0.4); font-weight: 400; }
#videoDur { color: rgba(232, 234, 240, 0.55); }
.video-rem { color: var(--accent); font-size: 10px; }
.video-rem.is-hidden { display: none; }

.video-bracket {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent2);
  opacity: 0.5;
  user-select: none;
}

.video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(232, 234, 240, 0.8);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.video-btn:hover {
  color: var(--accent2);
  background: rgba(56, 189, 248, 0.1);
}

.video-btn:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.video-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2.5;
}

.video-icon-pause {
  display: none;
}

.video-btn-playpause.playing .video-icon-play {
  display: none;
}
.video-btn-playpause.playing .video-icon-pause {
  display: block;
}

.video-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.video-btn-dash {
  font-size: 8px;
  opacity: 0.6;
}

.video-btn-rewind .video-icon,
.video-btn-fastforward .video-icon {
  width: 16px;
  height: 16px;
}

.video-timestamp {
  text-align: center;
  padding-top: 4px;
}

.video-status {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(232, 234, 240, 0.6);
  display: block;
  margin-bottom: 4px;
}

.video-time {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent2);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.video-time-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(232, 234, 240, 0.5);
  letter-spacing: 0.05em;
}

/* YouTube embed fills the screen container */
.demo-screen-yt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: #000;
}

.demo-screen-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Auto-fade controls when idle (no mouse / no focus) ── */
.video-player-frame.is-idle {
  cursor: none;
}

.video-controls-bar {
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

.video-player-frame.is-idle .video-controls-bar {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
}

/* ── Audio Feedback Floating Toggle ── */
.audio-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(15, 25, 35, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--sidebar-text);
  padding: 7px 12px;
  border-radius: 30px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.22s ease;
  z-index: 999;
}

.audio-toggle-btn:hover {
  background: rgba(15, 25, 35, 0.98);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 14px rgba(226, 183, 20, 0.25);
}

.audio-toggle-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Konami / Easter Egg Notification Pill & Mini Game Overlay ── */
.easter-egg-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: linear-gradient(135deg, #0d1b2a, #1a2535);
  border: 1.5px solid var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(226, 183, 20, 0.4);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.easter-egg-banner.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.easter-canvas-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

/* ══════════════════════════════════════════
   WAVE ANIMATION – Blur-Fade Entrance Wave
   Applies to all elements with .wave-entrance class
   Creates a staggered wave effect as page loads
══════════════════════════════════════════ */

@keyframes wave-blur-fade-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(8px);
  }
  60% {
    opacity: 0.7;
    transform: translateY(-4px) scale(1.01);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wave-blur-fade-in-slow {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
    filter: blur(10px);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-2px) scale(1.005);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wave-slide-left {
  0% {
    opacity: 0;
    transform: translateX(-40px) scale(0.98);
    filter: blur(8px);
  }
  60% {
    opacity: 0.7;
    transform: translateX(8px) scale(1.01);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wave-slide-right {
  0% {
    opacity: 0;
    transform: translateX(40px) scale(0.98);
    filter: blur(8px);
  }
  60% {
    opacity: 0.7;
    transform: translateX(-8px) scale(1.01);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wave-scale-in {
  0% {
    opacity: 0;
    transform: scale(0.85);
    filter: blur(6px);
  }
  60% {
    opacity: 0.8;
    transform: scale(1.02);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* Base wave entrance class - applies the animation */
.wave-entrance {
  opacity: 0;
  animation-fill-mode: forwards;
  will-change: opacity, transform, filter;
}

/* Wave animation variants - different directions for different elements */
.wave-entrance.wave-from-bottom {
  animation-name: wave-blur-fade-in;
}

.wave-entrance.wave-from-bottom-slow {
  animation-name: wave-blur-fade-in-slow;
}

.wave-entrance.wave-from-left {
  animation-name: wave-slide-left;
}

.wave-entrance.wave-from-right {
  animation-name: wave-slide-right;
}

.wave-entrance.wave-scale {
  animation-name: wave-scale-in;
}

/* Default: wave from bottom */
.wave-entrance:not(.wave-from-left):not(.wave-from-right):not(.wave-scale):not(.wave-from-bottom-slow) {
  animation-name: wave-blur-fade-in;
}

/* Animation duration and easing utilities */
.wave-duration-fast   { animation-duration: 0.5s; }
.wave-duration-normal { animation-duration: 0.7s; }
.wave-duration-slow   { animation-duration: 1s; }
.wave-duration-slower { animation-duration: 1.3s; }

.wave-ease-out     { animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
.wave-ease-spring  { animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.wave-ease-smooth  { animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Delay utilities for staggering - wave effect */
.wave-delay-0   { animation-delay: 0ms; }
.wave-delay-1   { animation-delay: 50ms; }
.wave-delay-2   { animation-delay: 100ms; }
.wave-delay-3   { animation-delay: 150ms; }
.wave-delay-4   { animation-delay: 200ms; }
.wave-delay-5   { animation-delay: 250ms; }
.wave-delay-6   { animation-delay: 300ms; }
.wave-delay-7   { animation-delay: 350ms; }
.wave-delay-8   { animation-delay: 400ms; }
.wave-delay-9   { animation-delay: 450ms; }
.wave-delay-10  { animation-delay: 500ms; }
.wave-delay-11  { animation-delay: 550ms; }
.wave-delay-12  { animation-delay: 600ms; }
.wave-delay-13  { animation-delay: 650ms; }
.wave-delay-14  { animation-delay: 700ms; }
.wave-delay-15  { animation-delay: 750ms; }
.wave-delay-16  { animation-delay: 800ms; }
.wave-delay-17  { animation-delay: 850ms; }
.wave-delay-18  { animation-delay: 900ms; }
.wave-delay-19  { animation-delay: 950ms; }
.wave-delay-20  { animation-delay: 1000ms; }
.wave-delay-21  { animation-delay: 1050ms; }
.wave-delay-22  { animation-delay: 1100ms; }
.wave-delay-23  { animation-delay: 1150ms; }
.wave-delay-24  { animation-delay: 1200ms; }
.wave-delay-25  { animation-delay: 1250ms; }
.wave-delay-26  { animation-delay: 1300ms; }
.wave-delay-27  { animation-delay: 1350ms; }
.wave-delay-28  { animation-delay: 1400ms; }
.wave-delay-29  { animation-delay: 1450ms; }
.wave-delay-30  { animation-delay: 1500ms; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .video-controls-bar { transition: opacity 0.15s ease; }
  .video-player-frame.is-idle .video-controls-bar { transform: none; }
  .badge-caret { animation: none !important; opacity: 1 !important; }
  .press-start-title { animation: none !important; }
  .wave-entrance {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ═══════════════════════════════════════════
   Skill Proficiency Popover
   Shared card (contact-popover base): name + 8-seg block bar + %.
   Segments stagger-fill left→right on show.
   ═══════════════════════════════════════════ */
.contact-popover-card.skill-pop {
  width: 200px;
  padding: 10px 12px 11px;
}

.skill-pop-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 7px;
}

.skill-pop-bar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.skill-pop-segs {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
}

.skill-pop-segs i {
  height: 11px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.skill-pop-segs i.on {
  background: linear-gradient(180deg, #ffe45c 0%, var(--accent) 100%);
  border-color: rgba(226, 183, 20, 0.7);
  box-shadow: 0 0 7px rgba(226, 183, 20, 0.55);
}

.skill-pop-pct {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent2);
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════
   osu! Custom Cursor + Trail
   Ring + center dot, click expand, glow trail.
   Only active on fine pointers (JS adds body.osu-on).
   ═══════════════════════════════════════════ */
.osu-trail {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99998;
  pointer-events: none;
}

.osu-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.osu-cursor.is-active { opacity: 1; }

.osu-cursor-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 0 6px rgba(226, 183, 20, 0.8));
  transition: transform 0.13s ease, filter 0.13s ease;
}

/* Click: cursor pops open like osu! */
.osu-cursor.is-down .osu-cursor-img { transform: scale(1.35); }

/* Hovering something clickable: tightens + cools to cyan */
.osu-cursor.is-hover .osu-cursor-img {
  transform: scale(0.85);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.95)) brightness(1.08);
}
.osu-cursor.is-down.is-hover .osu-cursor-img { transform: scale(1.12); }

/* Hide the native cursor only where a precise pointer exists + retro unlocked */
@media (hover: hover) and (pointer: fine) {
  html.retro-unlocked body.osu-on,
  html.retro-unlocked body.osu-on * { cursor: none !important; }
}

/* ═══════════════════════════════════════════
   PRESS START splash — full-screen boot overlay.
   Below cursor/trail (z 90000 < 99998) so the osu!
   cursor stays visible over it. Hidden in print.
   ═══════════════════════════════════════════ */
.press-start {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(226, 183, 20, 0.08) 0%, transparent 50%),
    #05080d;
  cursor: pointer;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.press-start.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.press-start::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

.press-start-inner {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.press-start-kicker {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--accent2);
  margin-bottom: 14px;
}

.press-start-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 6px;
  color: #fff;
  text-shadow:
    0 0 18px rgba(56, 189, 248, 0.65),
    0 0 46px rgba(226, 183, 20, 0.3);
  animation: pressBlink 1.1s steps(1) infinite;
}

.press-start-sub {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(232, 234, 240, 0.55);
}

@keyframes pressBlink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.12; }
}

/* Hold entrance animations until the splash is dismissed */
html.is-locked .wave-entrance {
  animation-play-state: paused !important;
}

/* ══════════════════════════════════════════
   RETRO GATE — clean PRO CV by default.
   FPS / QR / combo / SFX btn / osu cursor
   only exist after the Konami code.
   ══════════════════════════════════════════ */
html:not(.retro-unlocked) #audioToggleBtn,
html:not(.retro-unlocked) #fpsCounter,
html:not(.retro-unlocked) #qrCodeAnchor,
html:not(.retro-unlocked) #clickCombo,
html:not(.retro-unlocked) #clickComboGhost,
html:not(.retro-unlocked) .osu-cursor,
html:not(.retro-unlocked) .osu-trail {
  display: none !important;
}
.retro-btn {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--sidebar-text);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.retro-btn:hover { border-color: var(--accent); color: var(--accent); }
.retro-btn.is-on { background: var(--accent); border-color: var(--accent); color: #1a2535; }

/* ── Sidebar EDIT mode ── */
#sidebarFit { position: relative; max-height: 100%; overflow: hidden; }
/* overfull: never cap items — page grows past the A4, warning shows instead */
html.sidebar-overfull .page { height: auto; min-height: 297mm; overflow: visible; }
html.sidebar-overfull #sidebarFit { max-height: none; overflow: visible; }
.edit-only { display: none !important; }
html.editing .edit-only { display: revert !important; }
/* ── Hidden (not removed) items: gone in PRO/print, faded in EDIT ── */
html.editing .is-hidden-faded { opacity: 0.38; }
html.editing .is-hidden-faded .skill-icon-item i { filter: saturate(0.3); }
html.print-fit .is-hidden-faded { display: none !important; }

.skill-eye {
  position: absolute;
  top: -7px;
  left: -4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: none;
  background: rgba(56, 189, 248, 0.9);
  color: #0d1b2a;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}
.skill-eye:hover { background: var(--accent2); }
.lang-eye, .soft-eye {
  border: none;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent2);
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.lang-eye:hover, .soft-eye:hover { background: var(--accent2); color: #0d1b2a; }
.cv-eye.is-off { opacity: 0.35; filter: grayscale(1); }

/* print-fit: measure sidebar exactly as it will print (no edit UI) */
html.print-fit .edit-only { display: none !important; }
html.editing .edit-only.edit-btn-inline { display: inline-flex !important; }
html.editing .edit-only.edit-block { display: block !important; }

/* per-item remove handles + level badges (sidebar, edit mode only) */
html.editing .sidebar .skill-icon-link { position: relative; }
.skill-del {
  position: absolute;
  top: -7px;
  right: -4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}
.skill-del:hover { background: #b91c1c; }
.skill-lvl-badge {
  font-size: 8px;
  font-weight: 700;
  color: #1a2535;
  background: var(--accent);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.5;
}
.lang-del, .soft-del {
  margin-left: auto;
  border: none;
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.lang-del:hover, .soft-del:hover { background: #ef4444; color: #fff; }
.lang-lvl-edit {
  width: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  padding: 1px 4px;
}
.add-row-btn {
  width: 100%;
  margin-top: 6px;
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.45);
  border-radius: 6px;
  color: var(--accent2);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
}
.add-row-btn:hover { background: rgba(56, 189, 248, 0.1); }

/* ── Floating CV EDIT panel: left side, slides out on Ctrl+E (screen only) ──
   Same Regal Midnight look as the sidebar: layered cosmic gradients,
   corner glow + gold/cyan aura. Resizable, 30% wider default. */
.cv-edit-panel {
  position: fixed;
  top: 50%;
  left: 12px;
  transform: translateY(-50%) translateX(-130%);
  z-index: 9996;
  width: 344px;
  min-width: 260px;
  max-width: min(560px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  resize: horizontal;
  background:
    radial-gradient(ellipse at 80% 12%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 78%, rgba(226, 183, 20, 0.09) 0%, transparent 52%),
    radial-gradient(circle at 50% 108%, rgba(15, 25, 35, 0.95) 0%, transparent 60%),
    linear-gradient(165deg, #1d2b3e 0%, #1a2535 35%, #0f1923 75%, #080d14 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 12px;
  padding-bottom: 18px; /* room for the resize handle */
  color: var(--sidebar-text);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(56, 189, 248, 0.15),
    0 0 32px rgba(226, 183, 20, 0.08);
  font-size: 11px;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.38s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease,
    visibility 0s linear 0.4s;
}
html.editing.retro-unlocked .cv-edit-panel {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.25s ease;
}
.cv-edit-panel h5 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0 0 8px;
}
.cv-edit-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0; }
.cv-edit-tab { flex: 1 1 30%; }
.cv-edit-tab {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(232, 234, 240, 0.7);
  border-radius: 6px;
  padding: 4px 0;
  cursor: pointer;
}
.cv-edit-tab.is-active { background: var(--accent); border-color: var(--accent); color: #1a2535; }
.cv-edit-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 5px 6px;
}
.cv-edit-row input[type="text"],
.cv-edit-row input[type="number"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  min-width: 0;
}
/* wide stacked rows (education / project forms) + themed textareas */
.cv-edit-row.wrap { flex-wrap: wrap; }
.cv-edit-row.wrap input[type="text"],
.cv-edit-row.wrap select.cv-sel { flex: 1 1 44%; }
.cv-edit-row textarea {
  flex: 1 1 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-family: inherit;
  padding: 4px 6px;
  min-height: 44px;
  resize: vertical;
}
.cv-edit-row textarea.tall { min-height: 90px; }
.cv-edit-sub { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: rgba(232, 234, 240, 0.5); margin: 8px 0 3px; }
.cv-proj {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.cv-edit-techchips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.cv-edit-techchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(26, 37, 53, 0.9);
  border: 1px solid rgba(226, 183, 20, 0.4);
  border-radius: 99px;
  padding: 2px 4px 2px 8px;
}
.cv-edit-techchip button {
  border: none;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.cv-edit-techchip button:hover { background: #ef4444; color: #fff; }
.cv-edit-row input[type="range"] { flex: 1; min-width: 40px; accent-color: #E2B714; }
.cv-edit-row .lvl-num { font-size: 10px; font-weight: 700; color: var(--accent); min-width: 30px; text-align: right; cursor: text; }
.cv-edit-row .lvl-num:hover { text-decoration: underline dotted; }
/* click-to-edit value: keeps the gold % look */
.lvl-num-edit {
  width: 42px;
  background: rgba(226, 183, 20, 0.1);
  border: 1px solid rgba(226, 183, 20, 0.55);
  border-radius: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
  padding: 0 3px;
  outline: none;
}
.lvl-num-edit::-webkit-outer-spin-button,
.lvl-num-edit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lvl-num-edit { -moz-appearance: textfield; appearance: textfield; }

/* ── Themed dropdowns (match sidebar gold/cyan) ── */
.cv-edit-row select.cv-sel {
  -webkit-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23E2B714' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  border: 1px solid rgba(226, 183, 20, 0.35);
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: 10px;
  padding: 3px 20px 3px 6px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cv-edit-row select.cv-sel:hover { border-color: var(--accent); }
.cv-edit-row select.cv-sel:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}
.cv-edit-row select.cv-sel option { background: #0f1923; color: #e8eaf0; }
.cv-edit-mini {
  border: none;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  font-size: 10px;
  padding: 2px 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.cv-edit-mini:hover { background: #ef4444; color: #fff; }
.cv-edit-add {
  width: 100%;
  margin-top: 2px;
  background: rgba(226, 183, 20, 0.12);
  border: 1px dashed rgba(226, 183, 20, 0.5);
  color: var(--accent);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 0;
  cursor: pointer;
}
.cv-edit-add:hover { background: rgba(226, 183, 20, 0.22); }
.cv-edit-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cv-edit-foot .retro-btn { flex: 1 1 45%; text-align: center; }
/* RESET goes red on hover, SAVE is the yellow action */
#cvEditReset:hover { border-color: #ef4444; color: #fca5a5; background: rgba(239, 68, 68, 0.12); }
#cvEditSave { background: var(--accent); border-color: var(--accent); color: #1a2535; }
#cvEditSave:hover { color: #1a2535; border-color: var(--accent); filter: brightness(1.1); }

/* ── Editor header + dock titles: same container as the rows, no measured offsets.
   Group titles pin at the panel top while their section scrolls. ── */
.cv-edit-head {
  margin: -12px -12px 8px;
  padding: 12px 12px 10px;
  background:
    radial-gradient(ellipse at 80% 12%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 78%, rgba(226, 183, 20, 0.09) 0%, transparent 52%),
    linear-gradient(165deg, #1d2b3e 0%, #1a2535 60%, #0f1923 100%);
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}
.cv-edit-group-title {
  position: sticky;
  top: 0;
  z-index: 5;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 8px -6px 4px;
  padding: 5px 8px;
  background: #141f30;
  border-radius: 6px;
  border-bottom: 1px solid rgba(226, 183, 20, 0.35);
}

/* ── Drag-to-reorder grips + drop indicators ── */
.cv-grip {
  cursor: grab;
  color: rgba(232, 234, 240, 0.35);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 0 3px 0 1px;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.cv-grip:hover { color: var(--accent); }
.cv-grip:active { cursor: grabbing; }
.cv-edit-row.dragging { opacity: 0.4; }
.cv-edit-row.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.cv-edit-row.drop-after { box-shadow: 0 2px 0 var(--accent); }
.cv-edit-group { border-radius: 8px; }
.cv-edit-group.drop-append { outline: 1px dashed rgba(226, 183, 20, 0.65); outline-offset: -1px; }

/* ── Small confirm modal (keep / discard edits) ── */
.cv-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 13, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.25s;
}
.cv-confirm-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}
.cv-confirm-card {
  width: 250px;
  background: #0d1b2a;
  border: 1px solid rgba(226, 183, 20, 0.5);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 18px rgba(226, 183, 20, 0.25);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.cv-confirm-backdrop.is-open .cv-confirm-card { transform: scale(1) translateY(0); }
.cv-confirm-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}
.cv-confirm-desc {
  font-size: 11px;
  color: rgba(232, 234, 240, 0.75);
  line-height: 1.5;
  margin: 0 0 12px;
}
.cv-confirm-actions { display: flex; gap: 8px; }
.cv-confirm-actions .retro-btn { flex: 1; text-align: center; }
.cv-confirm-ok { background: var(--accent); border-color: var(--accent); color: #1a2535; }
.cv-confirm-ok:hover { color: #1a2535; border-color: var(--accent); filter: brightness(1.1); }

/* ── Unclaimed tenant takeover (unknown subdomain slug) ── */
.tenant-claim {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    #05080d;
}
.tenant-claim[hidden] { display: none; }
.tenant-claim-card { text-align: center; padding: 24px; }
.tenant-claim-emoji { font-size: 44px; }
.tenant-claim-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  margin: 10px 0 6px;
}
.tenant-claim-desc { font-size: 12px; color: rgba(232, 234, 240, 0.6); margin: 0 0 14px; }
.tenant-claim-link {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a2535;
  background: var(--accent);
  border-radius: 20px;
  padding: 8px 22px;
  text-decoration: none;
}
.tenant-claim-link:hover { filter: brightness(1.1); color: #1a2535; }
/* owner token field */
.cv-token-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(226, 183, 20, 0.4);
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  padding: 6px 8px;
  outline: none;
}
.cv-token-input:focus { border-color: var(--accent2); box-shadow: 0 0 8px rgba(56, 189, 248, 0.3); }

/* ── Sidebar auto-fit warnings ── */
.sidebar-fit-note {
  font-size: 9px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 5px 8px;
  margin-top: 8px;
  line-height: 1.4;
}
html:not(.editing) .sidebar-fit-note { display: none !important; }

/* ── Print Styles (Auto activated when taking PDF via Ctrl+P or automated print) ── */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: none !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .page {
    margin: 0 !important;
    box-shadow: none !important;
    width: 210mm !important;
    height: 297mm !important;
    overflow: hidden !important;
  }

  /* 1. Hide interactive contact dock, email copy button, demo pills, audio btn, and popovers */
  .contact-cards-wrapper,
  .contact-popover-card,
  .press-start,
  .osu-cursor,
  .osu-trail,
  .meteors-container,
  .sidebar::after,
  .demo-btn,
  .demo-modal-backdrop,
  .demo-screen-video,
  .audio-toggle-btn,
  .easter-egg-banner,
  .easter-canvas-overlay,
  #qrCodeAnchor,
  #clickCombo,
  #clickComboGhost,
  .tenant-claim {
    display: none !important;
  }

  /* 2. Show the clean original contact list */
  .print-contact-list {
    display: block !important;
    margin-top: 4px;
    margin-bottom: 0;
  }

  .contact-list li {
    font-size: 10.5px !important;
    margin-bottom: 6px !important;
    color: #e8eaf0 !important;
  }

  .contact-list i {
    color: #E2B714 !important;
  }

  .contact-list a {
    color: #e8eaf0 !important;
    text-decoration: none !important;
  }

  /* Hide FPS counter in print */
  #fpsCounter {
    display: none !important;
  }

  /* Typing effect: freeze already handled in JS; hide the blinking caret block */
  .badge-caret {
    display: none !important;
  }

  /* Pro-mode print: never show edit panel, confirm modal, edit handles, or hidden items */
  .cv-edit-panel,
  .cv-confirm-backdrop,
  .is-hidden-faded,
  .sidebar-fit-note,
  .skill-del,
  .skill-lvl-badge,
  .add-row-btn,
  .lang-del,
  .soft-del,
  .lang-lvl-edit {
    display: none !important;
  }

  /* Overfull print: let everything flow (may paginate past page 1) instead of capping */
  html.sidebar-overfull .page {
    height: auto !important;
    overflow: visible !important;
  }
  html.sidebar-overfull #sidebarFit {
    max-height: none !important;
    overflow: visible !important;
  }
}
