/* ============================================
   THEME TOGGLE BUTTON — desktop only
============================================ */
.theme-toggle { display: none; }

@media (min-width: 769px) {
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 300;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }
  .theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-glow);
  }
  .theme-toggle svg { width: 15px; height: 15px; fill: currentColor; }
  .theme-toggle .icon-moon { display: block; }
  .theme-toggle .icon-sun  { display: none;  }
  body.light .theme-toggle .icon-moon { display: none;  }
  body.light .theme-toggle .icon-sun  { display: block; }
  body.light .theme-toggle {
    border-color: #d0d0d0;
    color: #666;
    background: #fff;
  }
  body.light .theme-toggle:hover {
    border-color: #999;
    color: #333;
    background: #f5f5f5;
  }
}

/* ============================================
   SKELETON SHIMMER
============================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skel {
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* ============================================
   LIGHT MODE — SKELETON VIEW
============================================ */
body.light {
  background: #fff;
}

body.light .bg-grid { display: none; }

/* everything invisible */
body.light *:not(.roast-overlay):not(.roast-overlay *):not(.theme-toggle):not(.theme-toggle *) {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  border-color: #efefef !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* sidebar shell */
body.light .navbar {
  background-color: #fff !important;
  border-right-color: #e8e8e8 !important;
}

/* logo shimmer bar */
body.light .logo {
  position: relative;
}
body.light .logo::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 110px; height: 13px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* nav link shimmer bars */
body.light .nav-link { position: relative; }
body.light .nav-link::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  height: 9px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}
body.light .nav-links .nav-link:nth-child(1)::before { width: 50%; }
body.light .nav-links .nav-link:nth-child(2)::before { width: 62%; }
body.light .nav-links .nav-link:nth-child(3)::before { width: 76%; }
body.light .nav-links .nav-link:nth-child(4)::before { width: 66%; }

/* social icon tiles */
body.light .nav-social-icon {
  background-color: #f2f2f2 !important;
  border-color: #e2e2e2 !important;
}
body.light .nav-sidebar-footer {
  border-top-color: #e8e8e8 !important;
}

/* main */
body.light main { background: #fff; }
body.light section { border-bottom-color: #f0f0f0 !important; }

/* hero title shimmer */
body.light .hero-title { position: relative; min-height: 64px; }
body.light .hero-title::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 65%; height: 48px;
  background: linear-gradient(90deg, #e6e6e6 25%, #f2f2f2 50%, #e6e6e6 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 6px;
}

/* hero stats */
body.light .hero-stats { border-color: #ebebeb !important; }
body.light .stat {
  border-right-color: #ebebeb !important;
  border-bottom-color: #ebebeb !important;
  position: relative;
}
body.light .stat::before {
  content: '';
  position: absolute;
  left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  height: 9px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* eyebrow shimmer */
body.light .eyebrow { position: relative; min-height: 14px; }
body.light .eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 72px; height: 8px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* section title shimmer */
body.light .section-title { position: relative; min-height: 32px; }
body.light .section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 52%; height: 22px;
  background: linear-gradient(90deg, #e6e6e6 25%, #f2f2f2 50%, #e6e6e6 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* section sub shimmer */
body.light .section-sub { position: relative; min-height: 16px; }
body.light .section-sub::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 70%; height: 10px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* about text shimmer lines */
body.light .about-text p { position: relative; min-height: 14px; }
body.light .about-text p::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 88%; height: 9px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* cards */
body.light .skills-card,
body.light .edu-card {
  background-color: #fafafa !important;
  border-color: #ebebeb !important;
  position: relative;
  min-height: 72px;
}
body.light .edu-card::before {
  content: '';
  position: absolute;
  left: 20px; right: 20px; top: 22px;
  height: 9px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* project rows */
body.light .project-row {
  border-top-color: #f0f0f0 !important;
  position: relative;
}
body.light .project-list .project-row:last-child {
  border-bottom-color: #f0f0f0 !important;
}
body.light .project-row::before {
  content: '';
  position: absolute;
  left: 64px; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 9px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* buttons */
body.light .btn {
  background-color: #f0f0f0 !important;
  border-color: #e2e2e2 !important;
  position: relative;
  overflow: hidden;
}
body.light .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.55) 50%, transparent 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* tags */
body.light .tag {
  background-color: #f0f0f0 !important;
  border-color: #e8e8e8 !important;
}

/* form inputs */
body.light .form-field input,
body.light .form-field textarea {
  background-color: #fafafa !important;
  border-color: #e8e8e8 !important;
}

/* footer */
body.light .site-footer {
  background-color: #fff !important;
  border-top-color: #f0f0f0 !important;
}
body.light .footer-bottom { border-top-color: #f0f0f0 !important; }

/* hide cursor + pulse dot */
body.light .cursor,
body.light .status-available::before { display: none; }

/* ============================================
   ROAST OVERLAY
   Fully isolated — no inheritance from body.light
============================================ */
.roast-overlay { display: none; }

@keyframes roast-pop {
  0%   { opacity: 0; transform: scale(0.9); }
  65%  { transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes sun-wobble {
  0%, 100% { transform: rotate(-12deg) scale(1);   }
  50%       { transform: rotate( 12deg) scale(1.1); }
}

@media (min-width: 769px) {
  .roast-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }
  .roast-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }
  body:not(.light) .roast-overlay { display: none !important; }

  .roast-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: roast-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  .roast-emoji {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 28px;
    display: block;
    animation: sun-wobble 1.8s ease-in-out infinite;
    /* force visible — no inheritance */
    color: initial;
    -webkit-text-fill-color: initial;
  }

  .roast-text {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.45;
    /* hardcoded — immune to body.light cascade */
    color: #2a2a2a;
    -webkit-text-fill-color: #2a2a2a;
    background-color: transparent;
    letter-spacing: 0.01em;
    margin-bottom: 36px;
    max-width: 520px;
  }

  .roast-btn {
    font-family: 'Caveat', cursive;
    font-size: 19px;
    font-weight: 700;
    color: #f5f5f5;
    -webkit-text-fill-color: #f5f5f5;
    background: #1a1a1a;
    border: none;
    border-radius: 5px;
    padding: 11px 30px;
    cursor: pointer;
    pointer-events: all;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, transform 0.15s ease;
  }
  .roast-btn:hover  { background: #333; transform: scale(1.04); }
  .roast-btn:active { transform: scale(0.97); }
}
