/* ======= Modern overrides on top of styles-6.css ======= */

:root,
:root[data-theme="light"] {
  --c-sidebar: #2f4a57;
  --c-sidebar-gradient: linear-gradient(160deg, #3b5a6a 0%, #263a45 100%);
  --c-accent: #4fb3bf;
  --c-accent-strong: #3a9aa5;
  --c-text: #2d333b;
  --c-text-muted: #5b6773;
  --c-bg: #f4f5f7;
  --c-card: #ffffff;
  --c-border: #e5e7eb;
  --c-chip-bg: #eef2f5;
  --c-chip-text: #2f4a57;
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --radius: 10px;
}

:root[data-theme="dark"] {
  --c-sidebar: #1b2a33;
  --c-sidebar-gradient: linear-gradient(160deg, #22323c 0%, #0f181e 100%);
  --c-accent: #67d0db;
  --c-accent-strong: #4fb3bf;
  --c-text: #e6e9ee;
  --c-text-muted: #9aa5b1;
  --c-bg: #0e1216;
  --c-card: #161c22;
  --c-border: #242d36;
  --c-chip-bg: #1f2932;
  --c-chip-text: #cfd8df;
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 30px;
  margin: 0;
}

@media (max-width: 767px) { body { padding: 0; } }

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

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

p { line-height: 1.65; }
ul { padding-left: 1.1rem; }

/* Bootstrap utility replacements */
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.text-center { text-align: center; }

/* Inline SVG icons — must be forceful; no Bootstrap reset */
svg.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  fill: currentColor;
}
.section-title svg.icon { width: 16px; height: 16px; margin-right: 10px; color: var(--c-accent); }
.contact-list svg.icon { width: 15px; height: 15px; margin-right: 12px; color: var(--c-accent); }
.btn-primary svg.icon { width: 14px; height: 14px; }
#theme-toggle svg.icon { width: 16px; height: 16px; }

/* ======= Layout ======= */
.wrapper {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 1040px;
  margin: 0 auto;
  position: relative;
}

/* ======= Sidebar ======= */
.sidebar-wrapper {
  background: var(--c-sidebar-gradient);
  color: #e9eef2;
  padding: 48px 32px;
  width: 340px;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  min-height: 100%;
}

.sidebar-wrapper a { color: #e9eef2; }
.sidebar-wrapper a:hover { color: var(--c-accent); }

.sidebar-wrapper .container-block { margin-bottom: 36px; }
.sidebar-wrapper .container-block:last-child { margin-bottom: 0; }

.profile-container {
  background: transparent !important;
  padding: 12px 0 36px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 36px;
  text-align: center;
}

.profile-img {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 8px;
  color: #fff;
}

.tagline {
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  margin: 0;
}

/* CTA button sized for the dark sidebar — solid accent fill so it
   reads as a button immediately, deepens on hover. Sits directly
   under the tagline. */
.profile-cta {
  margin-top: 18px;
  background: var(--c-accent) !important;
  color: #fff !important;
  border: 1px solid var(--c-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  padding: 8px 16px;
}
.profile-cta:hover {
  background: var(--c-accent-strong) !important;
  border-color: var(--c-accent-strong);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.contact-list li {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  line-height: 1.9;
}
.contact-list li a { flex: 1; }

.container-block-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.education-container .item,
.languages-container .item,
.interests-container .item { margin-bottom: 14px; }

.degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 2px;
}

.education-container .meta,
.languages-container .meta {
  font-size: 0.82rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  margin: 0 0 2px;
}

.education-container .time {
  font-size: 0.78rem;
  color: var(--c-accent);
  font-weight: 500;
}

.credential-link {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-accent) !important;
  border: 1px solid rgba(79, 179, 191, 0.4);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.credential-link:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff !important;
  text-decoration: none;
}

.interests-list li,
.languages-container li {
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
}

/* Interests as compact icon chips in the dark sidebar */
.interests-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.interests-chips li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 0.78rem;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.interests-chips li:hover {
  background: rgba(79, 179, 191, 0.18);
  border-color: rgba(79, 179, 191, 0.55);
  transform: translateY(-1px);
}
.ix-emoji {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  /* Restore native emoji rendering even though parent overrides font */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", emoji;
}

.lang-desc { color: rgba(255, 255, 255, 0.55); }

/* ======= Main content ======= */
.main-wrapper {
  background: var(--c-card);
  color: var(--c-text);
  padding: 48px 56px 56px;
  margin-right: 340px;
}

@media (max-width: 940px) {
  .sidebar-wrapper { position: static; width: 100%; min-height: auto; }
  .main-wrapper { margin-right: 0; padding: 32px 24px; }
}

/* ======= Top nav ======= */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  background: var(--c-card);
  z-index: 10;
}
.top-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.top-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
}
.top-nav a:hover { color: var(--c-accent); }

#theme-toggle {
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
#theme-toggle:hover { color: var(--c-accent); border-color: var(--c-accent); }
#theme-toggle .icon { width: 16px; height: 16px; }
:root[data-theme="light"] #theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-sun { display: none; }

/* ======= Sections ======= */
.section { margin-bottom: 44px; scroll-margin-top: 80px; }

.section-title {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 10px;
  margin-bottom: 22px;
}

.summary p {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.summary strong { color: var(--c-text); font-weight: 600; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-sidebar);
  color: #fff !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--c-accent); transform: translateY(-1px); color: #fff !important; }

/* ======= Experience ======= */
.experiences-section .item {
  position: relative;
  padding: 0 0 28px 22px;
  margin-bottom: 6px;
  border-left: 2px solid var(--c-border);
}
.experiences-section .item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-card);
}
.experiences-section .item:last-child { border-left-color: transparent; }

.job-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}
.experiences-section .time {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.experiences-section .company {
  font-size: 0.9rem;
  color: var(--c-accent);
  font-weight: 500;
  margin: 2px 0 12px;
}
.experiences-section .details ul {
  margin: 0;
  padding-left: 1.1rem;
}
.experiences-section .details li {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  margin-bottom: 6px;
  line-height: 1.55;
}
.experiences-section .details li strong { color: var(--c-text); font-weight: 600; }

.upper-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

/* ======= Key Achievements ======= */
.projects-section .item {
  padding: 14px 18px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--c-text-muted);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.projects-section .item:hover {
  border-color: var(--c-accent);
  transform: translateY(-1px);
}
.projects-section .project-title {
  color: var(--c-text);
  font-weight: 600;
}

/* ======= AI & Emerging Tech ======= */
.ai-section .summary p { margin-bottom: 18px; }
.ai-section > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ai-section > ul li {
  padding: 14px 18px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--c-text-muted);
  line-height: 1.55;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ai-section > ul li:hover {
  border-color: var(--c-accent);
  transform: translateY(-1px);
}
.ai-section > ul li strong { color: var(--c-text); font-weight: 600; }
@media (max-width: 720px) {
  .ai-section > ul { grid-template-columns: 1fr; }
}

/* ======= Skills (action-grouped grid with brand icons) ======= */
.skill-group { margin-bottom: 26px; }

.skill-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text);
  margin: 0 0 4px;
}

.skill-group-tagline {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin: 0 0 12px;
  line-height: 1.4;
}

.skill-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}

.skill-tags li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-chip-bg);
  color: var(--c-chip-text);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  min-height: 32px;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s ease;
}
.skill-tags li:hover {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  transform: translateY(-1px);
}

.skill-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* Non-brand icons (Simple Icons set) are black — invert them in dark mode
   so they stay legible on a dark chip background. Brand-color icons
   (AWS, Azure, PowerShell) are exempt via .skill-icon--brand. */
:root[data-theme="dark"] .skill-icon:not(.skill-icon--brand) {
  filter: invert(1) brightness(1.5);
}

/* On hover the chip background turns accent (white text) — flip
   non-brand icons to white for contrast. */
.skill-tags li:hover .skill-icon:not(.skill-icon--brand) {
  filter: invert(1) brightness(2);
}
:root[data-theme="dark"] .skill-tags li:hover .skill-icon:not(.skill-icon--brand) {
  /* In dark mode we already inverted; on hover keep them inverted (still white) */
  filter: invert(1) brightness(2);
}

.level-bar { display: none; }

/* ======= Footer ======= */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--c-text-muted);
  font-size: 0.82rem;
}
.footer a { color: var(--c-text-muted); }
.footer a:hover { color: var(--c-accent); }

/* ======= Org logos (inline next to employers, schools, issuers) ======= */
.org-logo {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 6px;
  border-radius: 3px;
  background: #fff;
  padding: 1px;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.experiences-section .org-logo {
  width: 22px;
  height: 22px;
  vertical-align: -6px;
  margin-right: 8px;
}
.experiences-section .company a,
.sidebar-wrapper .meta a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.experiences-section .company a:hover,
.sidebar-wrapper .meta a:hover {
  color: var(--c-accent);
  border-bottom-color: currentColor;
}
.sidebar-wrapper .meta a { color: rgba(255, 255, 255, 0.78); }
.sidebar-wrapper .meta a:hover { color: var(--c-accent); }

/* ======= Easter eggs ======= */
#skills .section-title svg.icon {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
#skills .section-title svg.icon:hover { transform: rotate(-15deg) scale(1.15); }
#skills .section-title svg.icon:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.ee-stampable {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease;
}
.ee-stampable:hover { border-bottom-color: var(--c-accent); }
.ee-stampable:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.ee-rocket {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  z-index: 9999;
  transform-origin: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.ee-trail {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff8c8 0%, #ffae42 60%, rgba(255, 174, 66, 0) 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: ee-trail-fade 700ms ease-out forwards;
}
@keyframes ee-trail-fade {
  0%   { opacity: 0.95; transform: scale(1); }
  100% { opacity: 0;    transform: scale(0.2) translateY(20px); }
}

.ee-stamp {
  position: absolute;
  transform: translate(-50%, -50%) scale(0) rotate(-30deg);
  font-family: ui-monospace, "Courier New", monospace;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #c81a2a;
  border: 3px double #c81a2a;
  padding: 6px 14px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 9999;
  background: rgba(200, 26, 42, 0.05);
  white-space: nowrap;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 450ms ease;
  text-shadow: 0 1px 0 rgba(200, 26, 42, 0.15);
  box-shadow: 0 6px 18px rgba(200, 26, 42, 0.15);
}
.ee-stamp--in  { transform: translate(-50%, -50%) scale(1) rotate(-10deg); }
.ee-stamp--out { opacity: 0; transform: translate(-50%, -50%) scale(1.05) rotate(-10deg); }

.ee-confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 1px;
  animation: ee-confetti-fly 1000ms cubic-bezier(0.25, 0.6, 0.4, 1) forwards;
}
@keyframes ee-confetti-fly {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 360deg)); opacity: 0; }
}

.ee-firework {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  box-shadow: 0 0 6px currentColor;
  animation: ee-firework-fly 1200ms cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes ee-firework-fly {
  0%   { transform: translate(0, 0) scale(1);   opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

.ee-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  background: rgba(8, 14, 18, 0.94);
  color: #6cffa8;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 16px 28px;
  border-radius: 6px;
  border: 1px solid rgba(108, 255, 168, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5),
              inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease, transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 0 10px rgba(108, 255, 168, 0.45);
}
.ee-banner--in  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ee-banner--out { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
.ee-banner__cursor { display: inline-block; margin-left: 2px; animation: ee-cursor 700ms steps(2) infinite; }
@keyframes ee-cursor { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Make section-title icons feel interactive */
#about .section-title svg.icon,
#ai .section-title svg.icon,
#experience .section-title svg.icon,
#achievements .section-title svg.icon {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
#about .section-title svg.icon:hover,
#ai .section-title svg.icon:hover,
#experience .section-title svg.icon:hover,
#achievements .section-title svg.icon:hover {
  transform: scale(1.15);
  color: var(--c-accent-strong);
}
#about .section-title svg.icon:focus-visible,
#ai .section-title svg.icon:focus-visible,
#experience .section-title svg.icon:focus-visible,
#achievements .section-title svg.icon:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Profile-scan: scan line sweeps photo, then AUTHENTICATED badge */
.ee-scanline {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(79, 179, 191, 0) 0%,
    rgba(79, 179, 191, 0.95) 50%,
    rgba(79, 179, 191, 0) 100%);
  box-shadow: 0 0 12px rgba(79, 179, 191, 0.8);
  pointer-events: none;
  z-index: 9998;
  border-radius: 2px;
  animation: ee-scan 1200ms cubic-bezier(0.42, 0, 0.58, 1) forwards;
}
@keyframes ee-scan {
  0%   { transform: translateY(0);                                opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(var(--scan-distance, 200px));      opacity: 0; }
}

.ee-auth {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.7);
  background: rgba(8, 38, 22, 0.92);
  color: #6cffa8;
  font-family: ui-monospace, "Courier New", monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid rgba(108, 255, 168, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  text-shadow: 0 0 8px rgba(108, 255, 168, 0.5);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ee-auth--in  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ee-auth--out { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
.ee-auth__check { color: #6cffa8; margin-right: 4px; }

/* CPU pulse: concentric rings + sparkles */
.ee-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border: 2px solid var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: ee-ring-pulse 1300ms cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes ee-ring-pulse {
  0%   { transform: scale(0.4); opacity: 0.95; }
  100% { transform: scale(6);   opacity: 0;    }
}

.ee-sparkle {
  position: absolute;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 9999;
  animation: ee-sparkle-float 1300ms ease-out forwards;
  transform: translate(-50%, -50%);
}
@keyframes ee-sparkle-float {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0.5); }
  20%  { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0;
         transform: translate(calc(-50% + var(--dx, 0)),
                              calc(-50% + var(--dy, -80px))) scale(0.7); }
}

/* Briefcase years: balloon labels drift up */
.ee-year {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--c-sidebar);
  color: #fff;
  font-family: ui-monospace, "Courier New", monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  animation: ee-year-rise 1700ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes ee-year-rise {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0;
         transform: translate(calc(-50% + var(--dx, 0)),
                              calc(-50% + var(--dy, -160px))) scale(0.95); }
}

/* Harry Potter portrait: real motion comes from a video swap, layered
   on top of the still .profile-img and crossfaded in for ~6 seconds. */
.profile-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}
.profile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}
.profile-video.is-playing { opacity: 1; }

/* Trophy achievement: game-style slide-in banner */
.ee-achievement {
  position: fixed;
  top: 80px;
  right: -440px;
  width: 380px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 110, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 215, 110, 0.15) inset;
  z-index: 10000;
  pointer-events: none;
  transition: right 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ee-achievement--in  { right: 24px; }
.ee-achievement--out { right: -440px; transition-duration: 380ms; transition-timing-function: ease-in; }
.ee-achievement__icon {
  font-size: 36px;
  line-height: 1;
  animation: ee-trophy-bounce 800ms ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 6px rgba(255, 215, 110, 0.6));
}
@keyframes ee-trophy-bounce {
  0%   { transform: translateY(0) rotate(-6deg); }
  100% { transform: translateY(-6px) rotate(6deg); }
}
.ee-achievement__label {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ffd76e;
  margin-bottom: 2px;
}
.ee-achievement__title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* ======= Print ======= */
@media print {
  @page { size: Letter; margin: 0.5in; }

  /* Force light theme regardless of saved preference or prefers-color-scheme */
  :root,
  :root[data-theme="light"],
  :root[data-theme="dark"] {
    --c-bg: #fff;
    --c-card: #fff;
    --c-text: #1a1a1a;
    --c-text-muted: #444;
    --c-border: #c8c8c8;
    --c-sidebar: #1a1a1a;
    --c-sidebar-gradient: none;
    --c-chip-bg: #fff;
    --c-chip-text: #1a1a1a;
    --c-accent: #2f4a57;
    --c-accent-strong: #2f4a57;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Strip browser-default heading margins so my own margins are authoritative */
  h1, h2, h3, h4, h5, h6 { margin: 0 !important; padding: 0 !important; }

  /* Reset list spacing */
  ul, ol { margin: 0; padding: 0; }
  .list-unstyled { margin: 0 !important; padding: 0 !important; }

  /* Remove site chrome */
  .top-nav, #theme-toggle, .btn-primary, .footer { display: none !important; }
  .languages-container, .interests-container { display: none !important; }
  .credential-link { display: none !important; }
  .profile-img { display: none !important; }

  /* Single-column layout, no forced break between sidebar and main */
  .wrapper { box-shadow: none !important; border-radius: 0 !important; max-width: none !important; }
  .sidebar-wrapper {
    background: #fff !important;
    color: #000 !important;
    position: static !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 4pt !important;
    border-bottom: 0 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  .main-wrapper {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Sidebar collapsed: name + tagline + inline contacts, centered like the
     original two-page resume so the eye lands on identity first. */
  .profile-container {
    padding: 0 !important;
    margin: 0 0 4pt !important;
    border: 0 !important;
    text-align: center !important;
  }
  .name {
    color: #000 !important;
    font-size: 22pt !important;
    margin: 0 !important;
    line-height: 1.1 !important;
  }
  .tagline {
    color: #444 !important;
    font-size: 11pt !important;
    margin: 1pt 0 0 !important;
    line-height: 1.3 !important;
  }
  .sidebar-wrapper a { color: #000 !important; }
  .contact-container { margin: 0 0 8pt !important; }
  .contact-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 2pt 14pt !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .contact-list li { font-size: 9.5pt !important; line-height: 1.3 !important; margin: 0 !important; }
  .contact-list svg.icon { color: #444 !important; margin-right: 4pt !important; }

  /* Education & Certifications: each item on one line, tight stack */
  .sidebar-wrapper .container-block { margin: 0 0 6pt !important; }
  .sidebar-wrapper .container-block:last-child { margin-bottom: 0 !important; }
  .container-block-title {
    color: #000 !important;
    border-bottom: 1px solid #999 !important;
    font-size: 9pt !important;
    padding: 0 0 2pt !important;
    margin: 0 0 3pt !important;
    letter-spacing: 0.1em;
    line-height: 1.2 !important;
  }
  .education-container .item {
    margin: 0 0 2pt !important;
    padding: 0 !important;
    /* Eliminate whitespace between inlined block children */
    font-size: 0 !important;
    line-height: 1.35 !important;
  }
  .education-container .item .degree,
  .education-container .item .meta,
  .education-container .item .time {
    display: inline !important;
    font-size: 9.5pt !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
  }
  .education-container .item .degree {
    color: #000 !important;
    font-weight: 600 !important;
  }
  .education-container .item .meta {
    color: #444 !important;
    font-weight: 400 !important;
  }
  .education-container .item .time {
    color: #444 !important;
    font-weight: 400 !important;
  }
  .education-container .item .meta::before {
    content: "\00A0\00A0\00B7\00A0\00A0";
    color: #444;
  }
  .education-container .item .time::before {
    content: ", ";
    color: #444;
  }

  /* Sections tight */
  .section { margin-bottom: 10pt !important; scroll-margin-top: 0 !important; }
  .section:first-of-type { margin-top: 4pt !important; }
  .section-title {
    color: #000 !important;
    border-color: #999 !important;
    font-size: 9.5pt !important;
    padding-bottom: 2pt !important;
    margin-bottom: 6pt !important;
  }
  .section-title svg.icon { color: #444 !important; }
  .summary p { color: #000 !important; font-size: 10pt !important; line-height: 1.45 !important; margin-bottom: 5pt !important; }
  .summary strong { color: #000 !important; }

  /* Experience: drop timeline rail, tighten bullets */
  .experiences-section .item {
    border-left: 0 !important;
    padding: 0 0 8pt 0 !important;
    page-break-inside: avoid !important;
  }
  .experiences-section .item::before { display: none !important; }
  .job-title { font-size: 11pt !important; color: #000 !important; }
  .experiences-section .company { color: #444 !important; font-size: 9.5pt !important; margin: 0 0 3pt !important; }
  .experiences-section .time { color: #444 !important; font-size: 9.5pt !important; }
  .experiences-section .details ul { padding-left: 14pt !important; margin: 0 !important; }
  .experiences-section .details li { color: #000 !important; font-size: 9.5pt !important; line-height: 1.4 !important; margin-bottom: 2pt !important; }
  .experiences-section .details li strong { color: #000 !important; }

  /* AI section: plain bullet list, no cards */
  .ai-section .summary p { margin-bottom: 5pt !important; }
  .ai-section > ul {
    display: block !important;
    grid-template-columns: none !important;
    padding-left: 14pt !important;
    list-style: disc !important;
    margin: 0 !important;
  }
  .ai-section > ul li {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #000 !important;
    font-size: 9.5pt !important;
    line-height: 1.4 !important;
    margin: 0 0 3pt !important;
    page-break-inside: avoid !important;
  }
  .ai-section > ul li strong { color: #000 !important; }
  .ai-section > ul li:hover { transform: none !important; border-color: transparent !important; }

  /* Key Achievements: flat bullets */
  .projects-section .item {
    background: transparent !important;
    border: 0 !important;
    padding: 0 0 0 14pt !important;
    color: #000 !important;
    font-size: 9.5pt !important;
    line-height: 1.4 !important;
    border-radius: 0 !important;
    margin-bottom: 3pt !important;
    position: relative;
    page-break-inside: avoid !important;
  }
  .projects-section .item::before {
    content: "\2022";
    position: absolute;
    left: 2pt;
    top: 0;
  }
  .projects-section .project-title { color: #000 !important; }
  .projects-section .item:hover { transform: none !important; border-color: transparent !important; }

  /* Skills: compact bordered chips, flow as flex (no grid in print) */
  .skill-group { margin-bottom: 6pt !important; page-break-inside: avoid !important; }
  .skill-group-title { color: #000 !important; font-size: 9pt !important; margin: 0 0 3pt !important; }
  .skill-group-tagline { display: none !important; }
  .skill-icon { display: none !important; }
  .skill-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: none !important;
    gap: 3pt 4pt !important;
  }
  .skill-tags li {
    display: inline-flex !important;
    background: #fff !important;
    border: 1px solid #999 !important;
    color: #000 !important;
    font-size: 8.5pt !important;
    padding: 1pt 7pt !important;
    border-radius: 999px !important;
    font-weight: 500 !important;
    min-height: 0 !important;
    transform: none !important;
  }

  /* Links: clean, with URL only on long-form content */
  a { color: #000 !important; text-decoration: none !important; }
  a[href^="http"]::after { content: ""; }
  .summary a[href^="http"]::after,
  .summary-section a[href^="http"]::after,
  .projects-section a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    font-weight: normal;
  }

  /* Headings glue */
  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }

  /* Hide all easter-egg artifacts in print */
  .ee-rocket, .ee-trail, .ee-stamp, .ee-confetti,
  .ee-firework, .ee-banner,
  .ee-scanline, .ee-auth, .ee-ring, .ee-sparkle,
  .ee-year, .ee-achievement,
  .profile-video { display: none !important; }
  .ee-stampable { border-bottom: 0 !important; cursor: default !important; }
  #about .section-title svg.icon,
  #ai .section-title svg.icon,
  #experience .section-title svg.icon,
  #achievements .section-title svg.icon { cursor: default !important; }

  /* Hide org logos in print so the PDF stays clean and ATS-friendly */
  .org-logo { display: none !important; }
  /* Org links print as plain text */
  .experiences-section .company a,
  .sidebar-wrapper .meta a {
    color: inherit !important;
    border-bottom: 0 !important;
  }
}
