/*
Theme Name: Minimal Overlay Portfolio
Theme URI: https://example.com/
Author: You
Description: Ultra-minimal portfolio with left overlay menu and fullscreen background switching.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: minimal-overlay-portfolio
*/

:root {
  --sidebar-w: 240px;
  --ink: #111;
  --bg: #f6f6f6;
  --accent: #000;
  --panel-alpha: 0.55;
  --panel-bg: rgba(255,255,255,var(--panel-alpha));
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

#bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; display: grid; place-items: center; }
#bg-image { width: min(92vw, 1400px); height: auto; max-height: 86vh; object-fit: contain; display: block; filter: saturate(98%); transition: opacity 280ms ease; box-shadow: 0 10px 24px rgba(0,0,0,0.18); background: #fff; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  padding: 14px 16px; background: var(--panel-bg); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 2;
}
.brand { display: block; text-decoration: none; color: var(--ink); margin-bottom: 10px; font-weight: 600; }
.menu { list-style: none; padding: 0; margin: 0; }
.menu a { color: var(--ink); text-decoration: none; display: block; padding: 4px 0; position: relative; }
.menu a:hover { opacity: 0.85; }
.menu a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

.caption { position: fixed; left: 16px; bottom: 14px; color: #111; background: var(--panel-bg); padding: 4px 8px; border-radius: 4px; z-index: 2; }
.panel { position: fixed; top: 16px; left: calc(var(--sidebar-w) + 16px); max-width: 560px; background: var(--panel-bg); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); padding: 12px 14px; border-radius: 6px; color: #111; z-index: 3; }

/* Top-right site name + description */
.site-meta { position: fixed; top: 10px; right: 12px; text-align: right; z-index: 4; color: #111; background: var(--panel-bg); padding: 6px 8px; border-radius: 6px; display: flex; align-items: center; gap: 8px; }
.site-meta .site-title { font-weight: 600; font-size: 13px; }
.site-meta .site-tagline { font-size: 12px; opacity: 0.8; }
.site-meta .theme-toggle { appearance: none; border: 1px solid rgba(0,0,0,0.15); background: transparent; border-radius: 999px; padding: 4px 8px; cursor: pointer; font-size: 12px; }

/* Blur-up effect while loading hi-res */
#bg-image.is-blur { filter: blur(14px) saturate(110%); }

/* Dark theme */
body.theme-dark {
  --ink: #e8e8e8;
  --bg: #0f1012;
  --panel-bg: rgba(0,0,0,var(--panel-alpha));
}
.theme-dark .menu a { color: var(--ink); }
.theme-dark .brand { color: var(--ink); }

@media (max-width: 700px) {
  :root { --sidebar-w: 100%; }
  .sidebar { height: auto; right: 0; padding-bottom: 8px; }
  .menu { display: flex; gap: 14px; overflow-x: auto; }
  .panel { left: 16px; right: 16px; max-width: none; }
  .site-meta { right: 8px; left: auto; top: 8px; }
}
