/* ═══════════════════════════════════════════════════════
   RS Portfolio · Settings Panel CSS
   Side panel · Toggles · Segment controls · Cookie banner
   ═══════════════════════════════════════════════════════ */

/* ── Settings trigger (gear icon in nav) ── */
.settings-trigger {
  display: flex !important;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--sur);
  border: 1px solid var(--bdr);
  align-items: center;
  justify-content: center;
  transition: all .22s;
  flex-shrink: 0;
}
.settings-trigger svg {
  width: 18px;
  height: 18px;
  stroke: var(--txt);
  transition: transform .4s var(--ease), stroke .22s;
}
.settings-trigger:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.settings-trigger:hover svg { stroke: var(--gold); }
.settings-trigger.active svg { transform: rotate(75deg); }

/* ── Overlay ── */
.rs-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
  opacity: 0;
  transition: opacity .35s ease;
}
.rs-settings.open .rs-settings-overlay { opacity: 1; }

/* ── Panel wrapper ── */
.rs-settings {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  visibility: hidden;
}
.rs-settings.open {
  pointer-events: all;
  visibility: visible;
}

/* ── Slide-in panel ── */
.rs-settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--bg2);
  border-left: 1px solid var(--gold-line);
  box-shadow: -24px 0 80px rgba(0,0,0,.72), 0 0 0 0 var(--gold-glow);
  z-index: 2;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22,1,.36,1), box-shadow .42s ease;
  overflow: hidden;
}
.rs-settings.open .rs-settings-panel {
  transform: translateX(0);
  box-shadow: -24px 0 80px rgba(0,0,0,.72), -8px 0 40px rgba(212,151,42,.10);
}

/* Animated gold accent line on left edge */
.rs-settings-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--gold), var(--gold2), var(--gold3), var(--gold));
  z-index: 3;
  transition: height .6s cubic-bezier(.22,1,.36,1) .1s;
}
.rs-settings.open .rs-settings-panel::before { height: 100%; }

/* ── Header ── */
.rsp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--bdr-s);
  flex-shrink: 0;
  position: relative;
}
.rsp-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.rsp-header-left { display: flex; align-items: center; gap: 14px; }
.rsp-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  animation: settingsIconSpin 8s linear infinite paused;
}
.rs-settings.open .rsp-icon { animation-play-state: running; }
@keyframes settingsIconSpin {
  0%   { box-shadow: 0 0 0 0 rgba(212,151,42,0); }
  50%  { box-shadow: 0 0 18px 4px rgba(212,151,42,.3); }
  100% { box-shadow: 0 0 0 0 rgba(212,151,42,0); }
}
.rsp-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--txt); line-height: 1.2; }
.rsp-sub   { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt4); margin-top: 2px; }

.rsp-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--sur);
  border: 1px solid var(--bdr-s);
  display: flex; align-items: center; justify-content: center;
  color: var(--txt3);
  transition: all .22s;
  flex-shrink: 0;
}
.rsp-close:hover { background: rgba(255,80,80,.12); border-color: rgba(255,80,80,.4); color: #ff6060; transform: rotate(90deg); }

/* ── Body scroll ── */
.rsp-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-line) transparent;
}
.rsp-body::-webkit-scrollbar { width: 3px; }
.rsp-body::-webkit-scrollbar-thumb { background: var(--gold-line); border-radius: 3px; }

/* ── Sections ── */
.rsp-section {
  padding: 18px 24px 4px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .4s ease, transform .4s var(--ease);
}
.rs-settings.open .rsp-section:nth-child(1) { transition-delay: .1s; }
.rs-settings.open .rsp-section:nth-child(2) { transition-delay: .15s; }
.rs-settings.open .rsp-section:nth-child(3) { transition-delay: .2s; }
.rs-settings.open .rsp-section:nth-child(4) { transition-delay: .25s; }
.rs-settings.open .rsp-section:nth-child(5) { transition-delay: .3s; }
.rs-settings.open .rsp-section { opacity: 1; transform: translateX(0); }

.rsp-section-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsp-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--bdr-s), transparent);
}

/* ── Account card ── */
.rsp-account-card {
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  transition: border-color .25s;
}
.rsp-account-card:hover { border-color: var(--gold-line); }
.rsp-acc-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.rsp-acc-avatar.logged-in {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #060200;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
}
.rsp-acc-info { flex: 1; min-width: 0; }
.rsp-acc-name { font-size: 14px; font-weight: 600; color: var(--txt); }
.rsp-acc-sub  { font-size: 11px; color: var(--txt4); margin-top: 2px; }
.rsp-acc-btns { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Row ── */
.rsp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}
.rsp-row.rsp-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.rsp-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--txt2);
}
.rsp-row-label svg { color: var(--gold); flex-shrink: 0; }

.rsp-divider {
  height: 1px;
  background: var(--bdr-s);
  margin: 4px 0;
}

.rsp-hint {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: var(--txt4);
  letter-spacing: .3px;
  line-height: 1.5;
  padding: 6px 10px;
  background: var(--gold-dim);
  border-radius: 6px;
  border-left: 2px solid var(--gold-line);
  width: 100%;
  transition: all .25s;
}

/* ── Theme pills ── */
.rsp-theme-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.rsp-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid var(--bdr);
  background: var(--sur);
  color: var(--txt3);
  cursor: pointer;
  transition: all .22s var(--ease);
}
.rsp-pill:hover { border-color: var(--gold-line); color: var(--txt); }
.rsp-pill.active { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); box-shadow: 0 0 12px rgba(212,151,42,.2); }
.rsp-pill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rsp-pill-dark  .rsp-pill-dot { background: radial-gradient(circle at 30% 30%, #1a2030, #050810); border: 1.5px solid #606880; }
.rsp-pill-white .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #FFF5C0, #F0A800); border: 1.5px solid #C8860A; }
.rsp-pill-gray  .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #88B8E8, #6090C0); border: 1.5px solid #8FB4D9; }
.rsp-pill-emerald  .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #7FD4A8, #2E8C5E); border: 1.5px solid #4FBE8C; }
.rsp-pill-rosegold .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #F0C4B4, #C87860); border: 1.5px solid #D99A8C; }
.rsp-pill-purple   .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #D0B8F0, #7A4EBE); border: 1.5px solid #B292E0; }
.rsp-pill-crimson  .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #F0A090, #A02818); border: 1.5px solid #D9695F; }
.rsp-pill-teal     .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #A0E8EC, #1E8A94); border: 1.5px solid #57C2CB; }
.rsp-pill-copper   .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #ECC090, #A05A20); border: 1.5px solid #CB8A57; }
.rsp-pill-midnight .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #B0BEF4, #3244B0); border: 1.5px solid #7C8FEE; }
.rsp-pill-sepia    .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #F0E4CC, #A87E44); border: 1.5px solid #8C6937; }
.rsp-pill-mono     .rsp-pill-dot { background: radial-gradient(circle at 25% 25%, #F0F0F0, #808080); border: 1.5px solid #C9C9C9; }

/* ── Segment controls ── */
.rsp-seg {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--bdr-s);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  width: 100%;
}
.rsp-seg-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--txt4);
  background: none;
  border: none;
  cursor: pointer;
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.rsp-seg-btn:hover { color: var(--txt2); background: var(--sur); }
.rsp-seg-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #050100;
  box-shadow: 0 4px 14px rgba(212,151,42,.38);
  transform: scale(1.03);
}

/* ── Toggle switches ── */
.rsp-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg3);
  border: 1.5px solid var(--bdr);
  cursor: pointer;
  transition: background .25s, border-color .25s, box-shadow .25s;
  flex-shrink: 0;
}
.rsp-toggle[data-on="true"] {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,151,42,.4);
}
.rsp-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--txt4);
  transition: transform .25s var(--ease3), background .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.rsp-toggle[data-on="true"] .rsp-toggle-thumb {
  transform: translateX(20px);
  background: #050100;
}

/* ── Danger btn ── */
.rsp-danger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ff6060;
  background: rgba(255,60,60,.06);
  border: 1px solid rgba(255,60,60,.22);
  cursor: pointer;
  margin-top: 12px;
  transition: all .22s;
}
.rsp-danger-btn:hover { background: rgba(255,60,60,.14); border-color: rgba(255,60,60,.5); transform: translateY(-1px); }

/* ── About card ── */
.rsp-about-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--sur);
  border: 1px solid var(--bdr-s);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.rsp-about-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #C09020, #E8B030, #F8C840);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 900; font-size: 14px;
  color: #060200;
  box-shadow: 0 4px 16px rgba(212,151,42,.4);
  flex-shrink: 0;
}
.rsp-about-name { font-size: 13px; font-weight: 600; color: var(--txt); }
.rsp-about-ver  { font-family: 'Space Mono', monospace; font-size: 9px; color: var(--txt4); letter-spacing: 1px; margin-top: 3px; }

.rsp-links-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rsp-link-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  background: var(--sur);
  border: 1px solid var(--bdr-s);
  color: var(--txt3);
  transition: all .22s;
}
.rsp-link-btn svg { color: var(--gold); }
.rsp-link-btn:hover { border-color: var(--gold-line); color: var(--gold); background: var(--gold-dim); transform: translateY(-1px); }

/* ── Footer ── */
.rsp-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--bdr-s);
  display: flex; gap: 10px;
  flex-shrink: 0;
  background: var(--bg2);
  position: relative;
}
.rsp-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

/* ══════════════════════════════════════════
   COOKIE BANNER
   ══════════════════════════════════════════ */
.rs-cookie {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: min(760px, calc(100vw - 32px));
  background: var(--sur2);
  border: 1px solid var(--gold-line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.04);
  z-index: 8800;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .4s ease;
}
.rs-cookie.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
}
.cookie-icon { font-size: 26px; flex-shrink: 0; animation: cookieWiggle 3s ease-in-out infinite; }
@keyframes cookieWiggle {
  0%,100% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}
.cookie-text { flex: 1; min-width: 200px; }
.cookie-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.cookie-text span  { font-size: 11.5px; color: var(--txt3); line-height: 1.6; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   PERFORMANCE CLASSES applied to <html>
   ══════════════════════════════════════════ */

/* Anim = none */
html[data-anim="none"] *,
html[data-anim="none"] *::before,
html[data-anim="none"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
html[data-anim="none"] .aurora,
html[data-anim="none"] .ld-ring,
html[data-anim="none"] .h3d-ring,
html[data-anim="none"] .h3d-glow {
  display: none !important;
}

/* Anim = high */
html[data-anim="high"] .aurora { animation-duration: 6s !important; filter: blur(60px) !important; }
html[data-anim="high"] .hfc:hover { transform: translateY(-10px) scale(1.05) !important; }
html[data-anim="high"] .skill-card:hover { transform: translateY(-10px) scale(1.04) !important; }
html[data-anim="high"] .btn:hover { transform: translateY(-6px) scale(1.05) !important; }
html[data-anim="high"] .h3d-ring-1 { animation-duration: 12s !important; }
html[data-anim="high"] .h3d-ring-2 { animation-duration: 20s !important; }

/* Cursor off */
html[data-cursor="false"] #cx-dot,
html[data-cursor="false"] #cx-ring { display: none !important; }
html[data-cursor="false"] * { cursor: auto !important; }

/* Parallax off */
html[data-parallax="false"] .aurora { animation: none !important; }

/* Scroll-anim off */
html[data-scroll-anim="false"] .rev { opacity: 1 !important; transform: none !important; }

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  .rs-settings-panel { width: 100vw; border-left: none; border-top: 1px solid var(--gold-line); border-radius: 18px 18px 0 0; top: auto; bottom: 0; height: 92dvh; transform: translateY(100%); }
  .rs-settings.open .rs-settings-panel { transform: translateY(0); }
  .rs-settings-panel::before { left: 0; top: 0; width: 100%; height: 2px; transition: width .6s cubic-bezier(.22,1,.36,1) .1s; }
  .rs-settings.open .rs-settings-panel::before { width: 100%; height: 2px; }
  .rsp-acc-btns { flex-direction: column; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-actions { width: 100%; justify-content: center; }
  .rsp-theme-pills { flex-wrap: wrap; }
}
