/* ── Framer Pro Specification: Rope Toggle & Dark/Light Theme ── */

/* Smooth Theme Transitions */
html,
body,
.sec,
.glass,
.topfade,
.folder-drawer,
.about-banner,
.dial {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ── Dark Theme Overrides (Activated by Rope Pull) ── */
html[data-theme="dark"] {
  --ink: #f5f2eb !important;
  --ink2: #9AA7C7 !important;
  --sel: #FFB020 !important;
  --her: #4C7DFF !important;
  --paper: #0B1020 !important;
  --paper2: #1A2542 !important;
  --accent: #FFB020 !important;
  --accent-soft: rgba(255, 176, 32, 0.16) !important;
  background: #0B1020 !important;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0B1020 !important;
  color: #f5f2eb !important;
}

/* Glass cards and navigation */
html[data-theme="dark"] .glass {
  background: rgba(19, 28, 51, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6) !important;
  color: #f5f2eb !important;
}

html[data-theme="dark"] .skip-link {
  background: #131C33 !important;
  color: #f5f2eb !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .nav .me,
html[data-theme="dark"] .nav .me span {
  color: #f5f2eb !important;
}

html[data-theme="dark"] .nav .me small {
  color: #9AA7C7 !important;
}

html[data-theme="dark"] .nav .links a,
html[data-theme="dark"] .nav .links button {
  color: #f5f2eb !important;
}

html[data-theme="dark"] .nav .links a:hover,
html[data-theme="dark"] .nav .links button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile Menu */
html[data-theme="dark"] .mobile-menu {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f5f2eb !important;
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.8) !important;
}

/* Sections & Typography */
html[data-theme="dark"] .sec {
  background: #131C33 !important;
}

html[data-theme="dark"] .copy h1,
html[data-theme="dark"] .ab-story h3,
html[data-theme="dark"] .fd-header h2 {
  color: #f5f2eb !important;
}

html[data-theme="dark"] .copy p {
  color: #9AA7C7 !important;
}

html[data-theme="dark"] .sky {
  filter: none !important;
}

html[data-theme="dark"] .haze {
  background: radial-gradient(ellipse 70% 50% at 50% 64%, rgba(70, 42, 90, 0.38) 0%, rgba(25, 20, 48, 0.22) 50%, rgba(8, 10, 22, 0) 80%) !important;
}

html[data-theme="dark"] .art .pic {
  filter: brightness(0.93) contrast(1.04) saturate(1.04);
  transition: filter 0.6s ease;
}

html[data-theme="dark"] .topfade {
  background: linear-gradient(#131C33 55%, rgba(20, 21, 25, 0)) !important;
}

/* Nav Brand & Links */
html[data-theme="dark"] .nav .me b,
html[data-theme="dark"] .nav .me .ln {
  color: #f5f2eb !important;
}

/* Selected Work Section Header & End Card */
html[data-theme="dark"] .wtop h2 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .wtop p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .card.end {
  background: rgba(25, 27, 33, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-theme="dark"] .card.end h3 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .card.end p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .card.end .go {
  color: #f5f2eb !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .card.end .go i {
  background: #f5f2eb !important;
  color: #131C33 !important;
}

/* Showcase Cards inside Work */
html[data-theme="dark"] .sc-title {
  color: #ffffff !important;
}
html[data-theme="dark"] .sc-category {
  color: rgba(255, 255, 255, 0.82) !important;
}
html[data-theme="dark"] .sc-overview {
  color: #f5f2eb !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .sc-pill {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #C9D2E8 !important;
}
html[data-theme="dark"] .sc-pill-label {
  color: var(--accent) !important;
}
html[data-theme="dark"] .sc-desc {
  color: #9AA7C7 !important;
}

/* Inspirational Quotes (.kd-note, .kd-count, .kd-done) */
html[data-theme="dark"] .kd-count {
  background: #131C33 !important;
  color: #f5f2eb !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] .kd-pips b {
  background: #242F55 !important;
}
html[data-theme="dark"] .kd-pips b.on {
  background: var(--accent) !important;
}
html[data-theme="dark"] .kd-note {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .kd-note::before {
  background: repeating-linear-gradient(transparent 0 25px, rgba(255, 255, 255, 0.03) 25px 26px) !important;
}
html[data-theme="dark"] .kd-note blockquote {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .kd-note blockquote::before {
  color: var(--accent) !important;
  opacity: 0.6 !important;
}
html[data-theme="dark"] .kd-idx {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .kd-note footer {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .kd-meta b {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .kd-meta small {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .kd-x {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .kd-x:hover {
  background: var(--accent) !important;
  color: #0B1020 !important;
}
html[data-theme="dark"] .kd-done {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8) !important;
}
html[data-theme="dark"] .kd-done b {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .kd-done span {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .kd-done button {
  background: var(--accent) !important;
  color: #0B1020 !important;
}

/* Also on the desk cards (#more .mo) */
html[data-theme="dark"] #more .sh h2 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] #more .sh p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .more .mo {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .more .mo:hover {
  background: #1A2542 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .more .mo small {
  color: var(--accent) !important;
}
html[data-theme="dark"] .more .mo h3 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .more .mo .mo-l {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .more .mo .mo-h {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .more .mo .mo-go {
  color: var(--accent) !important;
}

/* Timeline Track (#path) */
html[data-theme="dark"] .tl-head h2 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .tl-head p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .ep .txt h3 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .ep .txt .org {
  color: #C9D2E8 !important;
}
html[data-theme="dark"] .ep .txt p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .ep .txt ul li {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f5f2eb !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .tl-rail .line {
  background: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .tl-rail .dot {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .tl-rail .dot i {
  background: #131C33 !important;
  border-color: #C9D2E8 !important;
}
html[data-theme="dark"] .tl-rail .dot.on i {
  background: var(--accent) !important;
  border-color: #fff !important;
}
html[data-theme="dark"] .tl-rail .dot span {
  color: #C9D2E8 !important;
}
html[data-theme="dark"] .path .stop {
  background: #131C33 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .path .stop h3 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .path .stop .org {
  color: var(--accent) !important;
}
html[data-theme="dark"] .path .stop p {
  color: #9AA7C7 !important;
}

/* FAQ Accordion Section */
html[data-theme="dark"] .faq-section {
  background: #131C33 !important;
}
html[data-theme="dark"] .faq-header h2 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .faq-header p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .faq-item {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .faq-item:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .faq-question-text {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .faq-answer {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .faq-answer-inner {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .faq-answer-inner strong {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .faq-cross-icon {
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .faq-cross-icon span {
  background: #f5f2eb !important;
}

/* Time Dial */
html[data-theme="dark"] .dial {
  background: rgba(19, 28, 51, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .dial-menu {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75) !important;
}
html[data-theme="dark"] .dial-menu button {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .dial-menu button:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .dial-menu b {
  color: var(--accent) !important;
}
html[data-theme="dark"] .dial .tip {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f5f2eb !important;
}

/* About Section Banner & Manila Folder */
html[data-theme="dark"] .about-banner {
  background: #231c18 !important;
  border-color: #634332 !important;
}
html[data-theme="dark"] .folder-drawer {
  background: #131C33 !important;
  color: #f5f2eb !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] .folder-tab-bar {
  background: #131418 !important;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .folder-tab-lip {
  background: #131C33 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .folder-drawer .drawer-close {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .fd-body h3,
html[data-theme="dark"] .fd-overview h4,
html[data-theme="dark"] .fd-panel h3 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .fd-body p,
html[data-theme="dark"] .fd-panel p {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .fd-stat-card {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .fd-stat-card span {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .fd-stat-card b {
  color: var(--accent) !important;
}
html[data-theme="dark"] .fd-dec-list li {
  background: rgba(26, 37, 66, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .pf-tag {
  background: #1e2027 !important;
  color: #f5f2eb !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Footer & Game Nudge */
html[data-theme="dark"] .foot {
  background: #0B1020 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .foot h2 {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .foot .mail {
  color: var(--accent) !important;
}
html[data-theme="dark"] .foot-links a {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .foot-links a:hover {
  color: #f5f2eb !important;
}
html[data-theme="dark"] .gnudge {
  background: #131C33 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] .gnudge span {
  color: #9AA7C7 !important;
}
html[data-theme="dark"] .gnudge .btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f5f2eb !important;
}
html[data-theme="dark"] .gnudge .btn.pri {
  background: var(--accent) !important;
  color: #0B1020 !important;
}

/* ── Rope Toggle Container: Compact Pull-and-Release in Sky ── */
.rope-toggle-container {
  position: absolute;
  top: 4%;
  right: clamp(60px, 9vw, 150px);
  width: 44px;
  height: 125px;
  z-index: 20;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.rope-toggle-root {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.rope-toggle-root:active {
  cursor: grabbing;
}

.rope-toggle-root:focus-visible {
  outline: 2px solid #FFB020;
  outline-offset: 4px;
  border-radius: 8px;
}

.rope-toggle-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  display: block;
}

/* Ceiling Mount Plate */
.rope-mount-base {
  fill: #3a3a40;
}
.rope-mount-rim {
  fill: rgba(255, 255, 255, 0.25);
}

/* Rope Filament Glow */
.rope-knob-glow {
  transition: filter 0.25s ease;
}

.rope-bulb-lit {
  filter: drop-shadow(0 0 10px #FFB020) drop-shadow(0 0 20px rgba(255, 209, 102, 0.5));
}

/* Animated spring transition for pull & release */
.rope-spring {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Little helpful tooltip */
.rope-hint-label {
  position: absolute;
  left: 50%;
  top: 96px;
  transform: translateX(-50%);
  font-family: Switzer, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .rope-hint-label {
  background: rgba(25, 27, 33, 0.9);
  color: #FFB020;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.rope-toggle-root:hover .rope-hint-label {
  opacity: 0.88;
  transform: translateX(-50%) translateY(2px);
}

/* Responsive adjustment */
@media (max-width: 900px) {
  .rope-toggle-container {
    top: 4%;
    right: 80px; /* beside mobile menu burger in sky */
    height: 110px;
    width: 40px;
  }
}

@media (max-width: 500px) {
  .rope-toggle-container {
    top: 4%;
    right: 70px;
    height: 100px;
  }
}

/* ── Cosmic Canvas Integration (my-constellation-bg) ── */
.sky-cosmic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

html[data-theme="dark"] .sky-cosmic-canvas,
html.dark .sky-cosmic-canvas {
  opacity: 1;
}

/* ── Midnight Ink (2026-11-14) — dark-first contrast fixes ── */
html[data-theme="dark"] .fnav-tab.on{background:#FFB020 !important;color:#0B1020 !important}
html[data-theme="dark"] .fd-btn-pri{background:#FFB020 !important;color:#0B1020 !important}
html[data-theme="dark"] .fd-btn-pri:hover{color:#0B1020 !important}
html[data-theme="dark"] .pop{background:#131C33 !important;color:#F5F2EB !important}
html[data-theme="dark"] .gdone .tick{color:#0B1020 !important}
html[data-theme="dark"] .drawer-close:hover{color:#0B1020 !important}
html[data-theme="dark"] .card .go i{color:#0B1020 !important}
html[data-theme="dark"] .card{background:#131C33 !important;border-color:rgba(255,255,255,.12) !important;color:#F5F2EB !important}
html[data-theme="dark"] .card .org{background:rgba(19,28,51,.85) !important;color:#F5F2EB !important}
html[data-theme="dark"] .card .lede,html[data-theme="dark"] .card .mx li{color:#9AA7C7 !important}
html[data-theme="dark"] .card .mx li b{color:#F5F2EB !important}
html[data-theme="dark"] .card .im{background:#1A2542 !important}
html[data-theme="dark"] .work-rail::before{background:linear-gradient(90deg,#0B1020,#0B1020 30%,transparent) !important}
html[data-theme="dark"] .work-rail::after{background:linear-gradient(-90deg,#0B1020,#0B1020 30%,transparent) !important}
html[data-theme="dark"] .badge{background:rgba(19,28,51,.75) !important}
html[data-theme="dark"] .plain{background:#131C33 !important;color:#F5F2EB !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] .sc-btn-primary{color:#0B1020 !important}
html[data-theme="dark"] .switch{background:rgba(11,16,32,.85) !important}
html[data-theme="dark"] .switch .on{background:#FFB020 !important;color:#0B1020 !important}
html[data-theme="dark"] .kd-sw{background:rgba(11,16,32,.88) !important}
html[data-theme="dark"] .kd-sw a.on{background:#FFB020 !important;color:#0B1020 !important}
html[data-theme="dark"] .work{background-image:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1.3px) !important}
html[data-theme="dark"] .work::before{background:radial-gradient(55% 45% at 90% 0%,rgba(76,125,255,.18),transparent 70%),radial-gradient(45% 40% at 0% 90%,rgba(255,176,32,.12),transparent 70%) !important}
html[data-theme="dark"] .prog{background:rgba(255,255,255,.14) !important}
html[data-theme="dark"] .topfade{background:linear-gradient(180deg,#0B1020,rgba(11,16,32,0)) !important}
html[data-theme="dark"] .folder-nav-tabs{background:rgba(255,255,255,.05) !important}
html[data-theme="dark"] .svc-card,html[data-theme="dark"] .svc-form{background:#131C33 !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] .svc-card .btn,html[data-theme="dark"] .svc-form .btn{background:#FFB020 !important;color:#0B1020 !important}
html[data-theme="dark"] .svc-card p,html[data-theme="dark"] .svc-note,html[data-theme="dark"] .svc-price span,html[data-theme="dark"] .svc-meta{color:#9AA7C7 !important}
html[data-theme="dark"] .svc-price{color:#F5F2EB !important}
html[data-theme="dark"] .svc-form input,html[data-theme="dark"] .svc-form select,html[data-theme="dark"] .svc-form textarea{background:#0B1020 !important;color:#F5F2EB !important;border-color:rgba(255,255,255,.2) !important}
html[data-theme="dark"] .fld{outline-color:#FFB020 !important}

/* Midnight Ink (2026-11-14) — art backdrops */
html[data-theme="dark"] .mo-art{background:radial-gradient(120% 90% at 50% 100%,#1A2542,#131C33 60%,#0B1020) !important}
html[data-theme="dark"] .art-plate.ap-2024{background:linear-gradient(145deg,#1A2542,#131C33) !important;color:#F5F2EB !important}
html[data-theme="dark"] .art-plate.ap-2018{background:linear-gradient(145deg,#131C33,#0B1020) !important;color:#F5F2EB !important}
