/* ---------- theme switch control ---------- */
.theme-switch { position:fixed; top:14px; right:16px; z-index:50; display:flex; gap:.35rem; font-family:'JetBrains Mono',ui-monospace,Menlo,monospace; font-size:.68rem; }
.theme-switch button { background:none; border:1px solid transparent; color:var(--muted); font:inherit; cursor:pointer; padding:.2rem .5rem; letter-spacing:.02em; transition:color .2s; }
.theme-switch button:hover { color:var(--accent); }
.theme-switch button[aria-pressed="true"] { color:var(--ink); border:1px solid var(--rule); }

/* ---------- dark ---------- */
[data-theme="dark"] { --paper:#131416; --ink:#e7e7e3; --muted:#93959a; --rule:#2c2d30; --accent:#5cbd8b; }
[data-theme="dark"] body { background:var(--paper); }
[data-theme="dark"] figure img { background:#f4f4ef; padding:14px; border-radius:2px; }
[data-theme="dark"] figure img.raster { mix-blend-mode:normal; }
[data-theme="dark"] .prop { background:rgba(92,189,139,.07); }
[data-theme="dark"] ::selection { background:#2c4c3b; }

/* ---------- retro windows ---------- */
[data-theme="retro"] { --paper:#008080; --ink:#000; --muted:#404040; --rule:#808080; --accent:#000080; }
[data-theme="retro"] body {
  background:var(--paper) url("/assets/wallpaper.jpg") center / cover no-repeat fixed;
  font-family:Tahoma,'MS Sans Serif',Verdana,sans-serif;
  font-size:13.5px; line-height:1.7;
  padding-top:9vh;
}
@supports (background:url("x")) {
  [data-theme="retro"] body { background-image:url("/assets/wallpaper.jpg"), url("/assets/hill.svg"); background-size:cover, cover; background-position:center, center; background-repeat:no-repeat, no-repeat; background-attachment:fixed, fixed; }
}
[data-theme="retro"] .wrap, [data-theme="retro"] .post {
  background:#c0c0c0;
  border:2px solid; border-color:#fff #404040 #404040 #fff;
  box-shadow:1px 1px 0 #000, 8px 8px 0 rgba(0,0,0,.25);
  padding:3.2rem 2.2rem 2.4rem;
  position:relative;
  margin-top:1rem;
}
[data-theme="retro"] .wrap::before, [data-theme="retro"] .post::before {
  content:"pratham_batra.exe";
  position:absolute; top:4px; left:4px; right:4px; height:26px;
  background:linear-gradient(90deg,#000080,#1084d0);
  color:#fff; font-weight:bold; font-size:13px;
  display:flex; align-items:center; padding:0 8px;
  letter-spacing:.01em;
}
[data-theme="retro"] .wrap::after, [data-theme="retro"] .post::after {
  content:"_ ❐ ✕";
  position:absolute; top:8px; right:10px; height:18px;
  color:#000; font-size:11px; font-weight:bold; line-height:18px;
  background:#c0c0c0; padding:0 4px;
  border:1px solid; border-color:#fff #404040 #404040 #fff;
  letter-spacing:.35em;
}
[data-theme="retro"] .wrap { padding-top:3.4rem; }
[data-theme="retro"] .name, [data-theme="retro"] .head h1, [data-theme="retro"] h2 { font-family:inherit; color:#000080; letter-spacing:0; }
[data-theme="retro"] h2 { border-top:1px solid #808080; box-shadow:0 -1px 0 #fff inset; padding-top:1.2rem; }
[data-theme="retro"] h2 .n { color:#008080; }
[data-theme="retro"] a, [data-theme="retro"] .links a, [data-theme="retro"] .email a, [data-theme="retro"] .latest a { color:#000080; text-decoration:underline; border:none; }
[data-theme="retro"] a:hover, [data-theme="retro"] .links a:hover { color:#ff0000; }
[data-theme="retro"] .links a::before { content:"►"; opacity:1; transform:none; color:#000080; font-size:.7em; }
[data-theme="retro"] .sub { color:#008080; }
[data-theme="retro"] .accent { color:#000080; font-weight:bold; }
[data-theme="retro"] blockquote { background:#fff; border:2px solid; border-color:#404040 #fff #fff #404040; padding:.8rem 1rem; color:#000; }
[data-theme="retro"] blockquote strong { color:#000080; }
[data-theme="retro"] .prop { background:#fff; border:2px solid; border-color:#404040 #fff #fff #404040; border-left:2px solid #404040; }
[data-theme="retro"] .prop .lbl { color:#000080; }
[data-theme="retro"] figure img { background:#fff; padding:10px; border:2px solid; border-color:#404040 #fff #fff #404040; }
[data-theme="retro"] figure img.raster { mix-blend-mode:normal; }
[data-theme="retro"] figcaption, [data-theme="retro"] .meta, [data-theme="retro"] .foot, [data-theme="retro"] .crumbs, [data-theme="retro"] .email { color:#404040; }
[data-theme="retro"] .note { background:#ffffe1; border:1px solid #000; color:#000; }
[data-theme="retro"] .thesis { border-color:#000080; color:#000080; }
[data-theme="retro"] table.t th, [data-theme="retro"] table.t td { border-bottom:1px solid #808080; }
[data-theme="retro"] .stages li { border-bottom:1px dotted #808080; }
[data-theme="retro"] .list li { border-bottom:1px solid #808080; box-shadow:0 1px 0 #fff; }
[data-theme="retro"] ::selection { background:#000080; color:#fff; }
[data-theme="retro"] .katex { font-size:1em; }
[data-theme="retro"] .theme-switch { font-family:Tahoma,Verdana,sans-serif; }
[data-theme="retro"] .theme-switch button { background:#c0c0c0; color:#000; border:2px solid; border-color:#fff #404040 #404040 #fff; box-shadow:1px 1px 0 #000; padding:.15rem .6rem; }
[data-theme="retro"] .theme-switch button:hover { color:#000; }
[data-theme="retro"] .theme-switch button[aria-pressed="true"] { border-color:#404040 #fff #fff #404040; box-shadow:none; background:#e0e0e0; }
[data-theme="retro"] .theme-switch button:active { border-color:#404040 #fff #fff #404040; }
@media (max-width:680px){
  [data-theme="retro"] body { padding:8vh 4vw 6vh; }
  [data-theme="retro"] .wrap, [data-theme="retro"] .post { padding:3rem 1.1rem 1.6rem; }
}
