/* ==========================================================================
   Premium CV Portfolio
   Themes: Liquid Glass · Classic CV · Modern CV · Dark Premium
   ========================================================================== */

/* ===== ROOT VARIABLES ===== */
:root {
  --serif: 'Instrument Serif', 'Playfair Display', serif;
  --display: 'Space Grotesk', -apple-system, sans-serif;
  --body: 'Inter', -apple-system, sans-serif;
  --easing: cubic-bezier(0.65, 0, 0.35, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 24px;
  --radius-sm: 12px;
  --radius-lg: 32px;
}

/* ===== THEME: LIQUID GLASS (default) ===== */
[data-theme="liquid"] {
  --bg: #0b0d1a;
  --bg-2: #0f1226;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f6ff;
  --text-muted: #b1b4cf;
  --text-dim: #6f7398;
  --accent: #a8c0ff;
  --accent-2: #ffafd1;
  --accent-3: #b6ffd0;
  --accent-soft: rgba(168, 192, 255, 0.18);
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --blur: 24px;
  --font-display: var(--display);
}

/* ===== THEME: CLASSIC CV (clean light) ===== */
[data-theme="classic"] {
  --bg: #fafaf7;
  --bg-2: #f0f0eb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f7f3;
  --border: #e2e2db;
  --border-strong: #c7c7be;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-dim: #888;
  --accent: #1a1a1a;
  --accent-2: #8b6f47;
  --accent-3: #2d5016;
  --accent-soft: rgba(26, 26, 26, 0.08);
  --gradient-1: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
  --gradient-2: linear-gradient(135deg, #8b6f47 0%, #c19a6b 100%);
  --gradient-3: linear-gradient(135deg, #2d5016 0%, #5d8a3a 100%);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --blur: 0px;
  --font-display: 'Playfair Display', serif;
}

/* ===== THEME: MODERN CV ===== */
[data-theme="modern"] {
  --bg: #f5f7fa;
  --bg-2: #eef1f6;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f0f3f8;
  --border: #e1e6ed;
  --border-strong: #c7cfd9;
  --text: #1a2332;
  --text-muted: #5a6878;
  --text-dim: #8b96a5;
  --accent: #5b6cff;
  --accent-2: #ff6b9d;
  --accent-3: #00d4aa;
  --accent-soft: rgba(91, 108, 255, 0.1);
  --gradient-1: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #ff6b9d 0%, #ffa07a 100%);
  --gradient-3: linear-gradient(135deg, #00d4aa 0%, #00b4ff 100%);
  --shadow: 0 4px 20px rgba(91, 108, 255, 0.08);
  --shadow-lg: 0 20px 60px rgba(91, 108, 255, 0.15);
  --blur: 0px;
  --font-display: var(--display);
}

/* ===== THEME: DARK PREMIUM ===== */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #0e0e0e;
  --surface: #131313;
  --surface-strong: #1a1a1a;
  --surface-soft: #0f0f0f;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #f5f5f5;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #d4ff3a;
  --accent-2: #ff6b35;
  --accent-3: #00ffaa;
  --accent-soft: rgba(212, 255, 58, 0.15);
  --gradient-1: linear-gradient(135deg, #d4ff3a 0%, #00ffaa 100%);
  --gradient-2: linear-gradient(135deg, #ff6b35 0%, #ff1744 100%);
  --gradient-3: linear-gradient(135deg, #00ffaa 0%, #00d4ff 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.8);
  --blur: 0px;
  --font-display: var(--display);
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background 0.5s var(--easing), color 0.5s var(--easing);
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
::selection { background: var(--accent); color: var(--bg); }

/* ===== ANIMATED BG ===== */
.bg-canvas {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.blob {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.32;
  animation: float 28s var(--easing) infinite;
}
.blob-1 {
  background: var(--gradient-1);
  top: -240px; left: -160px;
  animation-delay: 0s;
}
.blob-2 {
  background: var(--gradient-2);
  bottom: -240px; right: -160px;
  animation-delay: -10s;
}
.blob-3 { display: none; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, -60px) scale(1.1); }
  66% { transform: translate(-60px, 80px) scale(0.95); }
}

[data-theme="classic"] .bg-canvas,
[data-theme="modern"] .bg-canvas {
  background: var(--bg);
}
[data-theme="classic"] .blob,
[data-theme="modern"] .blob {
  opacity: 0.1;
}
[data-theme="dark"] .blob {
  opacity: 0.18;
}

.grid-overlay { display: none; }

/* ===== NETWORK CANVAS (animated connected dots) ===== */
.network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}
[data-theme="classic"] .network-canvas {
  opacity: 0.22;
  mix-blend-mode: multiply;
}
[data-theme="modern"] .network-canvas {
  opacity: 0.28;
  mix-blend-mode: multiply;
}

/* ===== DOTS PATTERN (subtle texture) ===== */
.dots-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text-dim) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
  pointer-events: none;
}
[data-theme="classic"] .dots-pattern { opacity: 0.4; }
[data-theme="modern"] .dots-pattern { opacity: 0.35; }

/* ===== GLASS UTILITIES (premium liquid glass) ===== */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  position: relative;
}
.glass-soft {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="classic"] .glass,
[data-theme="modern"] .glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
[data-theme="classic"] .glass-soft,
[data-theme="modern"] .glass-soft {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* ===== NAVIGATION (PINNED liquid glass app bar) ===== */
.nav {
  position: fixed !important;
  top: 14px !important;
  left: 20px;
  right: 20px;
  z-index: 9999 !important;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  max-width: 1200px;
  margin: 0 auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(40px) saturate(2);
  -webkit-backdrop-filter: blur(40px) saturate(2);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    inset 1px 0 0 rgba(255, 255, 255, 0.06),
    inset -1px 0 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.4s var(--easing-out),
    border-color 0.4s var(--easing-out),
    box-shadow 0.4s var(--easing-out);
  transform: translateZ(0);
  will-change: background, border-color, box-shadow;
}
.nav.scrolled {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: var(--accent);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.6),
    0 0 36px var(--accent-soft),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="classic"] .nav,
[data-theme="modern"] .nav {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 100%);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.1),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
}
.nav__logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: 16px;
}
.nav__logo-mark {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 18px;
}
.nav__links {
  display: flex; gap: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.nav__links a {
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  transition: all 0.25s var(--easing-out);
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav__links a:hover {
  color: var(--text);
  background: var(--surface);
}
.nav__links a.active {
  color: var(--bg);
  background: var(--accent);
  box-shadow:
    0 0 24px var(--accent-soft),
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-weight: 600;
}
.nav__links a.active svg {
  stroke-width: 2.4;
}
[data-theme="classic"] .nav__links a.active {
  color: white;
  background: var(--text);
}
.nav__cta {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600; font-size: 13px;
  transition: all 0.25s var(--easing-out);
  border: 1px solid var(--accent);
  box-shadow:
    0 2px 10px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px var(--accent-soft),
    0 0 24px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="classic"] .nav__cta {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ===== HAMBURGER + MOBILE MENU ===== */
.nav__hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  cursor: pointer;
  transition: all 0.25s var(--easing-out);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav__hamburger span {
  width: 16px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s var(--easing-out);
  transform-origin: center;
}
.nav__hamburger:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
  transform: scale(1.05);
}

.mobile-menu {
  position: fixed; inset: 0;
  z-index: 1500;
  display: none;
  pointer-events: none;
}
.mobile-menu.open { display: block; pointer-events: auto; }
.mobile-menu__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s var(--easing-out);
}
.mobile-menu.open .mobile-menu__overlay { opacity: 1; }
.mobile-menu__sheet {
  position: absolute;
  top: 0; right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  border-left: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  padding: 20px 22px calc(28px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(.16, 1, .3, 1);
  box-shadow:
    -24px 0 60px rgba(0, 0, 0, 0.5),
    inset 1px 0 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(40px) saturate(2);
  -webkit-backdrop-filter: blur(40px) saturate(2);
}
[data-theme="classic"] .mobile-menu__sheet,
[data-theme="modern"] .mobile-menu__sheet {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  border-left-color: rgba(0, 0, 0, 0.08);
}
.mobile-menu.open .mobile-menu__sheet { transform: translateX(0); }
.mobile-menu__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mobile-menu__close {
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.25s var(--easing-out);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.mobile-menu__close:hover {
  border-color: var(--accent);
  transform: rotate(90deg);
}
.mobile-menu__links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.mobile-menu__links li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all 0.25s var(--easing-out);
}
.mobile-menu__links li a::after {
  content: '→';
  font-size: 16px;
  color: var(--text-dim);
  transition: 0.25s;
}
.mobile-menu__links li a:hover,
.mobile-menu__links li a:active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.mobile-menu__links li a:hover::after { color: var(--accent); transform: translateX(4px); }
.mobile-menu__cta {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .nav { padding: 10px 14px; gap: 8px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .nav__logo-text { font-size: 14px; }
}
@media (max-width: 480px) {
  .nav { top: 14px; left: 14px; right: 14px; padding: 9px 12px; }
  .nav__logo { font-size: 14px; }
  .nav__logo-mark { font-size: 16px; }
}

/* ===== SETTINGS / THEME SWITCHER ===== */
.settings {
  position: fixed; top: 20px; right: 20px;
  z-index: 200;
}
.settings__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: all 0.3s var(--easing-out);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.settings__btn:hover {
  transform: rotate(90deg);
  background: var(--surface-strong);
  border-color: var(--accent);
  box-shadow:
    0 8px 24px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.settings__btn svg { transition: transform 0.6s; }

@media (max-width: 1100px) {
  .settings { top: auto; bottom: 24px; right: 24px; }
}

.settings__panel {
  position: fixed;
  top: 80px; right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  backdrop-filter: blur(40px) saturate(2);
  -webkit-backdrop-filter: blur(40px) saturate(2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  padding: 24px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s var(--easing-out);
  z-index: 201;
}
[data-theme="classic"] .settings__panel,
[data-theme="modern"] .settings__panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}
.settings__panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 1100px) {
  .settings__panel {
    top: auto; bottom: 80px; right: 24px;
  }
}
.settings__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.settings__head h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
}
.settings__close {
  font-size: 22px; color: var(--text-muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--surface-soft);
  transition: all 0.25s var(--easing-out);
  cursor: pointer;
}
.settings__close:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  transform: rotate(90deg);
}
.settings__section {
  margin-bottom: 20px;
}
.settings__section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 600;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.theme-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all 0.3s var(--easing-out);
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.theme-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow:
    0 0 24px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.theme-preview {
  height: 50px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.theme-preview--liquid { background: linear-gradient(135deg, #667eea, #764ba2 60%, #f093fb); }
.theme-preview--classic {
  background: #fafaf7;
  border: 1px solid #e2e2db;
  position: relative;
}
.theme-preview--classic::before {
  content: ''; position: absolute; left: 8px; top: 8px;
  width: 30px; height: 4px; background: #1a1a1a; border-radius: 2px;
}
.theme-preview--classic::after {
  content: ''; position: absolute; left: 8px; top: 18px;
  width: 60%; height: 2px; background: #888; border-radius: 2px;
  box-shadow: 0 6px 0 #888, 0 12px 0 #888;
}
.theme-preview--modern {
  background: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 50%, #ff6b9d 100%);
}
.theme-preview--dark {
  background: #0a0a0a;
  position: relative;
}
.theme-preview--dark::before {
  content: ''; position: absolute; right: 8px; bottom: 8px;
  width: 16px; height: 16px; background: #d4ff3a; border-radius: 50%;
  box-shadow: 0 0 12px #d4ff3a;
}

.settings__action {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  margin-bottom: 8px;
  transition: all 0.25s var(--easing-out);
  font-family: var(--font-display);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.settings__action:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== HERO (with giant scroll-scale text) ===== */
.hero {
  min-height: 100vh;
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr clamp(140px, 18vw, 240px);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(96px, 12vh, 130px) clamp(20px, 4vw, 40px) clamp(60px, 8vh, 80px);
  min-height: 100vh;
  position: relative;
  z-index: 2;
}
.hero__content { position: relative; z-index: 3; }
.hero__avatar-wrap { position: relative; z-index: 3; }

/* Giant background wordmark */
.hero__giant {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(140px, 22vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  opacity: 0.18;
  background: linear-gradient(180deg, var(--text) 0%, transparent 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, opacity;
  user-select: none;
}
[data-theme="dark"] .hero__giant {
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.22;
}
@media (max-width: 700px) {
  .hero__giant { font-size: clamp(100px, 28vw, 200px); opacity: 0.12; }
}

.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-display);
  margin-bottom: 24px;
  width: fit-content;
}
.dot-pulse {
  width: 6px; height: 6px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 var(--accent-3);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-3); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.6vw, 78px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: clamp(12px, 2vh, 20px);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title em {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}
[data-theme="classic"] .hero__title em {
  background: none;
  -webkit-text-fill-color: var(--accent-2);
  color: var(--accent-2);
}

.hero__slogan {
  font-size: clamp(14px, 1.4vw, 19px);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.hero__location {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
  font-family: var(--font-display);
}

.hero__actions {
  display: flex; gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-display);
  transition: all 0.3s var(--easing-out);
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow:
    0 4px 16px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px var(--accent-soft),
    0 0 30px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="classic"] .btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(var(--blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--danger {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}
.btn--danger:hover {
  background: rgba(255, 71, 87, 0.25);
  border-color: #ff4757;
}
.btn--full { width: 100%; justify-content: center; }
.btn .arrow { transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(4px); }

/* HERO AVATAR */
.hero__avatar-wrap {
  position: relative;
  width: clamp(140px, 18vw, 240px);
  height: clamp(140px, 18vw, 240px);
  aspect-ratio: 1;
}
.hero__avatar {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-strong);
  display: flex; align-items: center; justify-content: center;
}
.hero__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.hero__avatar-fallback {
  font-family: var(--font-display);
  font-size: clamp(50px, 8vw, 90px);
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.hero__avatar-ring {
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 2px dashed var(--border-strong);
  animation: rotate 30s linear infinite;
  pointer-events: none;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.hero__avatar-badge {
  position: absolute;
  bottom: 10px; right: -10px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
  display: flex; align-items: center; gap: 6px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.hero__avatar-badge span:first-child {
  color: var(--accent);
}

.hero__scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  z-index: 3;
  opacity: var(--scroll-opacity, 1);
  transition: opacity 0.3s;
}
.line-down {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
}
@media (max-width: 900px) { .hero__scroll { display: none; } }

/* ===== SECTION ===== */
.section {
  padding: 80px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .section { padding: 60px 24px; }
}
.section__head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section__index {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ===== ABOUT ===== */
.about {
  padding: 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; padding: 28px; }
}
.about__bio {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  font-family: var(--serif);
}
[data-theme="modern"] .about__bio,
[data-theme="dark"] .about__bio {
  font-family: var(--body);
}
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  transition: all 0.3s var(--easing-out);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.stat:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow:
    0 12px 28px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.stat__num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}
[data-theme="classic"] .stat__num {
  background: none; -webkit-text-fill-color: var(--text);
}
.stat__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== SKILLS ===== */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.skill-group {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  transition: all 0.35s var(--easing-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.skill-group:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.25),
    0 0 30px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.skill-group h3 {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.skill {
  margin-bottom: 16px;
}
.skill:last-child { margin-bottom: 0; }
.skill__head {
  display: flex; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.skill__name { font-weight: 500; }
.skill__pct {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 12px;
}
.skill__bar {
  height: 6px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.skill__fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 999px;
  width: 0;
  transition: width 1.4s var(--easing-out);
  position: relative;
}
.skill__fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 80%);
}
.timeline-item {
  position: relative;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  transition: all 0.35s var(--easing-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.timeline-item:hover {
  transform: translateX(6px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.2),
    0 0 24px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px; top: 28px;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-period {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.timeline-company {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: var(--serif);
  font-style: italic;
}
.timeline-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== PORTFOLIO ===== */
.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.portfolio-item {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  transition: all 0.4s var(--easing-out);
  display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.portfolio-item:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 36px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.portfolio-thumb {
  aspect-ratio: 16 / 10;
  background: var(--gradient-1);
  position: relative;
  overflow: hidden;
}
.portfolio-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--easing-out);
}
.portfolio-item:hover .portfolio-thumb img {
  transform: scale(1.05);
}
.portfolio-thumb-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 800;
  color: rgba(255,255,255,0.6);
  letter-spacing: -0.04em;
}
.portfolio-body {
  padding: 24px;
  flex: 1;
  display: flex; flex-direction: column;
}
.portfolio-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.portfolio-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.portfolio-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.portfolio-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.portfolio-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-display);
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: all 0.25s var(--easing-out);
  width: fit-content;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.portfolio-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="classic"] .portfolio-link {
  color: var(--text);
}

/* ===== CONTACT ===== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px;
}
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; }
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.contact__sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.contact__channels {
  display: flex; flex-direction: column; gap: 8px;
}
.channel {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--easing-out);
  font-size: 14px;
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.channel:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow:
    0 8px 22px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.channel-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-1);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.channel-body { flex: 1; }
.channel-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.channel-handle {
  font-weight: 600;
  color: var(--text);
}

.contact__form {
  display: flex; flex-direction: column; gap: 14px;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.25s var(--easing-out);
  font-family: var(--body);
  resize: vertical;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.form-status {
  font-size: 13px;
  color: var(--accent-3);
  text-align: center;
  min-height: 18px;
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-display);
}
.footer__mark {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: 8px;
}
.footer__bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  text-align: center;
}
.footer__mkm {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  transition: all 0.4s var(--easing-out);
  display: inline-block;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.footer__mkm:hover {
  color: var(--text-muted);
  border-color: var(--border-strong);
  background: var(--surface);
}
.footer__mkm.listening {
  color: var(--accent);
  letter-spacing: 0.6em;
  animation: mkmPulse 1.2s ease-in-out infinite;
}
@keyframes mkmPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== ADMIN PANEL ===== */
.admin {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
}
.admin.open { display: block; }
.admin__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.admin__sheet {
  position: absolute;
  top: 5vh; left: 50%;
  transform: translateX(-50%);
  width: 90vw; max-width: 1100px;
  height: 90vh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(48px) saturate(2);
  -webkit-backdrop-filter: blur(48px) saturate(2);
}
[data-theme="classic"] .admin__sheet,
[data-theme="modern"] .admin__sheet {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}
.admin__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.admin__head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.admin__head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin__dirty {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.3s var(--easing-out);
  pointer-events: none;
  white-space: nowrap;
}
.admin__dirty.show {
  opacity: 1;
  transform: translateX(0);
}
.admin__apply {
  padding: 10px 18px !important;
  font-size: 13px !important;
  position: relative;
}
.admin__apply::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: var(--gradient-1);
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity 0.3s;
}
.admin__apply.pulse::after { opacity: 0.7; animation: applyPulse 1.5s ease-in-out infinite; }
@keyframes applyPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.9; }
}
@media (max-width: 700px) {
  .admin__dirty { display: none; }
  .admin__apply span:last-child { display: none; }
}
.admin__close {
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--easing-out);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.admin__close:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.admin__login {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.admin__login-card {
  text-align: center;
  max-width: 360px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin__login-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.admin__login h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  margin-bottom: 6px;
}
.admin__login p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.admin__login input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  margin-bottom: 12px;
  font-size: 15px;
}
.admin__login input:focus { outline: none; border-color: var(--accent); }
.admin__hint {
  font-size: 12px;
  margin-top: 16px;
  color: var(--text-dim);
}
.admin__hint code {
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.admin__body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.admin__nav {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.admin__tab {
  text-align: left;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  transition: all 0.25s var(--easing-out);
  border: 1px solid transparent;
  cursor: pointer;
}
.admin__tab:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.admin__tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.admin__tab--danger { margin-top: auto; color: #ff4757; }
.admin__tab--danger:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

.admin__main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}
.admin__tab-pane { display: none; }
.admin__tab-pane.active { display: block; }
.admin__tab-pane h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.admin__sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.admin__list {
  display: flex; flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.admin__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  position: relative;
}
.admin__item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.admin__item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-display);
}
.admin__item-remove {
  color: #ff4757;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 71, 87, 0.2);
  font-weight: 600;
}
.admin__item-remove:hover {
  background: rgba(255, 71, 87, 0.1);
}
.admin__item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin__item-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .admin__sheet { width: 100vw; height: 100vh; top: 0; border-radius: 0; }
  .admin__nav { width: 70px; padding: 12px 6px; }
  .admin__tab { font-size: 11px; padding: 8px 10px; text-align: center; }
  .admin__main { padding: 16px; }
  .admin__item-grid { grid-template-columns: 1fr; }
}
.admin__actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.admin__group {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border);
}
.admin__group:last-of-type { border-bottom: none; }
.admin__group h4 {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.admin__text-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 12px;
  align-items: start;
}
.admin__text-row > label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 10px;
  font-family: var(--font-display);
}
.admin__text-row input,
.admin__text-row select {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--body);
}
.admin__text-row input:focus,
.admin__text-row select:focus {
  outline: none;
  border-color: var(--accent);
}
.admin__text-row .mini-grid {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
  grid-column: 2 / 3;
}
@media (max-width: 700px) {
  .admin__text-row { grid-template-columns: 1fr; }
  .admin__text-row > label { padding-top: 0; }
  .admin__text-row .mini-grid { grid-column: 1 / 2; }
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: all 0.4s var(--easing-out);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== ANIMATIONS ON SCROLL ===== */
.section, .portfolio-item, .timeline-item, .skill-group, .stat {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s var(--easing-out);
}
.section.in-view, .portfolio-item.in-view, .timeline-item.in-view, .skill-group.in-view, .stat.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CLASSIC THEME OVERRIDES ===== */
[data-theme="classic"] {
  font-family: 'Playfair Display', 'Georgia', serif;
}
[data-theme="classic"] body { font-family: 'Georgia', serif; }
[data-theme="classic"] .nav,
[data-theme="classic"] .glass {
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
[data-theme="classic"] .blob { display: none; }
[data-theme="classic"] .grid-overlay { display: none; }
[data-theme="classic"] .hero__avatar-ring { border-color: #1a1a1a; }
[data-theme="classic"] .skill__fill { background: #1a1a1a; }

/* ===== MODERN THEME OVERRIDES ===== */
[data-theme="modern"] .nav,
[data-theme="modern"] .glass {
  background: white;
  box-shadow: 0 2px 20px rgba(91, 108, 255, 0.06);
}
[data-theme="modern"] .blob { opacity: 0.12; }
[data-theme="modern"] .grid-overlay { display: none; }

/* ===== DARK THEME OVERRIDES ===== */
[data-theme="dark"] .blob { opacity: 0.2; filter: blur(140px); }

/* ===== UTILS ===== */
.hidden { display: none !important; }

/* ==========================================================================
   MUSIC BUTTON
   ========================================================================== */
.music-btn {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 200;
  backdrop-filter: blur(var(--blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.5);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s var(--easing-out);
}
.music-btn:hover {
  border-color: var(--accent);
  box-shadow:
    0 8px 22px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.music-btn__on, .music-btn__bars { display: none; }
.music-btn.playing .music-btn__off { display: none; }
.music-btn.playing .music-btn__on { display: block; }
.music-btn.playing .music-btn__bars {
  display: flex;
  gap: 2px;
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  height: 10px;
  align-items: flex-end;
}
.music-btn__bars span {
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: barPulse 0.8s ease-in-out infinite;
}
.music-btn__bars span:nth-child(1) { animation-delay: 0s; }
.music-btn__bars span:nth-child(2) { animation-delay: 0.15s; }
.music-btn__bars span:nth-child(3) { animation-delay: 0.3s; }
.music-btn__bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes barPulse {
  0%, 100% { height: 3px; }
  50% { height: 10px; }
}
@media (max-width: 600px) {
  .music-btn { bottom: 16px; left: 16px; width: 42px; height: 42px; }
}

/* ==========================================================================
   EDIT MODE (visual editor)
   ========================================================================== */
body.edit-mode [data-edit-key] {
  outline: 2px dashed var(--accent);
  outline-offset: 6px;
  cursor: pointer;
  position: relative;
  transition: outline-color 0.2s;
  border-radius: 4px;
}
body.edit-mode [data-edit-key]:hover {
  outline-color: var(--accent-2);
  outline-style: solid;
}

/* Drag handle (top-left of element) */
.edit-handle {
  position: absolute;
  top: -16px; left: -16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: grab;
  z-index: 100;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.edit-handle:active { cursor: grabbing; }
body.edit-mode [data-edit-key] > .edit-handle {
  display: flex;
}

/* Floating editor card */
.edit-popup {
  position: fixed;
  z-index: 1500;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  display: none;
  flex-direction: column;
  gap: 10px;
}
.edit-popup.show { display: flex; }
.edit-popup__head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.edit-popup__close {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}
.edit-popup .field { gap: 4px; }
.edit-popup .field label {
  font-size: 10px;
  color: var(--text-dim);
}
.edit-popup .field input,
.edit-popup .field textarea,
.edit-popup .field select {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}
.edit-popup__row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
}

/* Edit Mode toggle button (visible when edit mode is on) */
.edit-toggle-fab {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--accent);
  cursor: pointer;
  z-index: 1499;
  display: none;
  box-shadow:
    0 8px 22px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
body.edit-mode .edit-toggle-fab { display: block; }

/* Music presets in admin */
.music-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.music-preset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.music-preset:hover { border-color: var(--accent); background: var(--surface-strong); }
.music-preset.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.music-preset__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.music-preset__name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}
.music-preset__sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Admin steps list */
.admin__steps {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.admin__steps li strong { color: var(--accent); margin-right: 4px; }
.admin__steps em { color: var(--text); font-style: normal; font-weight: 600; font-family: var(--font-display); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
}

/* ==========================================================================
   CINEMATIC WOW EFFECTS
   ========================================================================== */

/* ===== CINEMATIC INTRO ===== */
.intro {
  position: fixed; inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  pointer-events: all;
  cursor: pointer;
  isolation: isolate;
}
.intro.fade {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(8px);
  pointer-events: none;
  transition: opacity 1.1s cubic-bezier(.16,1,.3,1),
              transform 1.4s cubic-bezier(.16,1,.3,1),
              filter 1.1s cubic-bezier(.16,1,.3,1);
}
.intro__bg {
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(102, 126, 234, 0.45), transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(240, 147, 251, 0.35), transparent 60%);
  filter: blur(80px);
  animation: introBgPulse 4s ease-in-out infinite;
  z-index: -1;
}
[data-theme="classic"] .intro__bg,
[data-theme="modern"] .intro__bg { opacity: 0.3; }

.intro__char-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(90vmin, 720px);
  height: min(90vmin, 720px);
}
.intro__char {
  font-family: var(--serif);
  font-size: clamp(180px, 45vmin, 360px);
  line-height: 0.85;
  font-weight: 400;
  background: linear-gradient(135deg, #f5f6ff 0%, #b1b4cf 50%, #667eea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  text-align: center;
  letter-spacing: -0.02em;
  animation: introChar 2.2s cubic-bezier(.22, 1, .36, 1) forwards;
  filter: drop-shadow(0 12px 40px rgba(102, 126, 234, 0.4));
}
[data-theme="classic"] .intro__char {
  background: linear-gradient(135deg, #1a1a1a 0%, #555 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
@keyframes introChar {
  0% { transform: scale(0.92); opacity: 0; filter: blur(30px); }
  25% { transform: scale(1); opacity: 1; filter: blur(0) drop-shadow(0 12px 40px rgba(102, 126, 234, 0.4)); }
  65% { transform: scale(1); opacity: 1; }
  85% { transform: scale(0.85); opacity: 0.5; filter: blur(2px); }
  100% { transform: scale(0.05); opacity: 0; filter: blur(20px); }
}
@keyframes introBgPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(8deg); }
}

.intro__meta {
  position: absolute;
  bottom: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: introMeta 2.4s cubic-bezier(.22,1,.36,1) forwards;
}
.intro__line-l, .intro__line-r {
  display: block;
  width: 50px; height: 1px;
  background: linear-gradient(to right, transparent, var(--text-muted), transparent);
}
.intro__sub {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}
@keyframes introMeta {
  0%, 30% { opacity: 0; transform: translateY(10px); }
  50%, 75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}
.intro__skip {
  position: absolute;
  bottom: 20px; right: 24px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  opacity: 0;
  animation: introSkip 1.5s ease forwards 1s;
}
@keyframes introSkip {
  to { opacity: 0.6; }
}

/* ===== CURSOR GLOW (premium pointer) ===== */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 360px; height: 360px;
  margin: -180px 0 0 -180px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle at center,
    rgba(168, 192, 255, 0.18) 0%,
    rgba(240, 147, 251, 0.06) 35%,
    transparent 70%
  );
  filter: blur(36px);
  opacity: 0;
  will-change: transform;
  transition: opacity 0.6s ease;
  mix-blend-mode: screen;
}
.cursor-glow.visible { opacity: 1; }

[data-theme="classic"] .cursor-glow,
[data-theme="modern"] .cursor-glow {
  mix-blend-mode: multiply;
  background: radial-gradient(
    circle at center,
    rgba(91, 108, 255, 0.18) 0%,
    rgba(255, 107, 157, 0.08) 30%,
    transparent 70%
  );
}

.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--text);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  will-change: transform;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease, width 0.25s, height 0.25s, margin 0.25s;
}
.cursor-dot.visible { opacity: 0.9; }
.cursor-dot.expand {
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  background: var(--accent);
  opacity: 0.4;
}

@media (max-width: 1024px), (pointer: coarse) {
  .cursor-glow, .cursor-dot { display: none; }
}

/* ===== NOISE / GRAIN TEXTURE ===== */
.noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: noiseShift 0.6s steps(2) infinite;
}
@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
[data-theme="classic"] .noise { opacity: 0.08; mix-blend-mode: multiply; }
[data-theme="modern"] .noise { opacity: 0.03; }

/* ===== BG GRADIENT ENHANCE ===== */
.bg-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(240, 147, 251, 0.12), transparent 60%);
  pointer-events: none;
}
[data-theme="classic"] .bg-gradient { display: none; }

/* Floating spheres removed for cleaner layout */

/* ===== AVATAR 3D + SHINE ===== */
.hero__avatar {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.hero__avatar-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.18) 55%,
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.4s, transform 1.2s cubic-bezier(.65, 0, .35, 1);
  mix-blend-mode: overlay;
  z-index: 2;
}
.hero__avatar:hover .hero__avatar-shine {
  opacity: 1;
  transform: translateX(100%);
}

/* ===== GLASS HOVER (light follows cursor) ===== */
.glass {
  position: relative;
  isolation: isolate;
}
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.08),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
.glass:hover::after { opacity: 1; }

[data-theme="classic"] .glass::after,
[data-theme="modern"] .glass::after {
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(91, 108, 255, 0.06),
    transparent 50%
  );
}

/* ===== SUBTLE MARQUEE ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin: 60px 0 0;
  position: relative;
  z-index: 2;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}
.marquee__track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  align-items: center;
  animation: marqueeRun 50s linear infinite;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  width: max-content;
}
.marquee__track em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text);
}
.marquee__dot {
  color: var(--accent);
  font-size: 0.4em;
  display: inline-block;
  transform: translateY(-0.3em);
  opacity: 0.6;
}
@keyframes marqueeRun {
  to { transform: translateX(-50%); }
}

/* ===== MAGNETIC BUTTONS ===== */
[data-magnetic] {
  display: inline-flex;
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
[data-magnetic] > * {
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1);
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
  opacity: 0;
  transition:
    opacity 1s cubic-bezier(.22, 1, .36, 1),
    transform 1.1s cubic-bezier(.22, 1, .36, 1),
    filter 1.1s cubic-bezier(.22, 1, .36, 1);
}
[data-reveal="up"] { transform: translateY(30px); }
[data-reveal="down"] { transform: translateY(-30px); }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="scale"] { transform: scale(0.92); filter: blur(6px); }
[data-reveal="fade"] {}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Hero text reveal — staggered chars */
.reveal-text {
  display: inline-block;
  overflow: hidden;
  position: relative;
}

/* ===== PARALLAX ===== */
.hero__title { transform: translateZ(0); will-change: transform; }
.hero__avatar-wrap { will-change: transform; }

/* ===== SMOOTH THEME TRANSITION ===== */
body {
  transition:
    background 1s cubic-bezier(.22, 1, .36, 1),
    color 0.6s ease;
}
body * {
  transition-property: background-color, color, border-color, box-shadow;
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}
body *.no-color-trans { transition: none; }

/* Disable transitions during intro */
body.intro-playing * {
  transition: none !important;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--gradient-1);
  z-index: 99999;
  transition: width 0.1s linear;
  box-shadow: 0 0 20px var(--accent);
}

/* ===== LIQUID BLOB ENHANCED ===== */
.blob {
  border-radius: 47% 53% 51% 49% / 49% 51% 49% 51%;
  animation: float 20s var(--easing) infinite, morph 12s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 47% 53% 51% 49% / 49% 51% 49% 51%; }
  25% { border-radius: 56% 44% 38% 62% / 41% 65% 35% 59%; }
  50% { border-radius: 35% 65% 60% 40% / 55% 41% 59% 45%; }
  75% { border-radius: 62% 38% 49% 51% / 36% 56% 44% 64%; }
}

/* ===== 3D PORTFOLIO REVEAL ===== */
.portfolio { perspective: 1400px; }
.portfolio-item {
  transform-origin: center top;
  transform: perspective(1400px) rotateX(18deg) translateY(60px);
  opacity: 0;
  transition:
    transform 1.1s cubic-bezier(.22, 1, .36, 1),
    opacity 0.9s cubic-bezier(.22, 1, .36, 1),
    border-color 0.3s,
    box-shadow 0.3s;
}
.portfolio-item.in-view {
  transform: perspective(1400px) rotateX(0deg) translateY(0);
  opacity: 1;
}

/* ===== CONTACT GLOW ===== */
.section--contact, #contact { position: relative; }
#contact .contact {
  position: relative;
  isolation: isolate;
  transition: box-shadow 1.2s var(--easing-out);
}
#contact .contact::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-1);
  filter: blur(40px);
  opacity: 0;
  z-index: -1;
  transition: opacity 1.5s var(--easing-out);
}
#contact .contact.in-view::before { opacity: 0.35; }
[data-theme="classic"] #contact .contact.in-view::before { opacity: 0.1; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .intro { display: none !important; }
  .hero { min-height: 100vh; }
  .hero__inner { position: relative; }
  .hero__giant { display: none; }
}

/* ==========================================================================
   FLUID RESPONSIVE — clamp() bilan, layout o'zgarmaydi
   ========================================================================== */

/* Section paddings — fluid */
.section { padding: clamp(50px, 8vh, 80px) clamp(20px, 4vw, 40px); }
.section__head { margin-bottom: clamp(24px, 4vh, 40px); gap: clamp(10px, 1.5vw, 16px); }
.section__title { font-size: clamp(28px, 4.5vw, 56px); }
.section__index { font-size: clamp(10px, 1vw, 12px); }

/* About — fluid */
.about { padding: clamp(24px, 3.5vw, 40px); gap: clamp(20px, 3vw, 40px); }
.about__bio { font-size: clamp(15px, 1.4vw, 18px); }
.stat { padding: clamp(14px, 2vw, 20px); }
.stat__num { font-size: clamp(26px, 3vw, 36px); }
.stat__label { font-size: clamp(10px, 1vw, 12px); }

/* Skills — fluid */
.skill-group { padding: clamp(18px, 2.5vw, 28px); }
.skill-group h3 { font-size: clamp(12px, 1.2vw, 14px); }

/* Timeline — fluid */
.timeline { padding-left: clamp(28px, 3.5vw, 40px); }
.timeline-item { padding: clamp(18px, 2.5vw, 24px) clamp(20px, 3vw, 28px); }
.timeline-title { font-size: clamp(17px, 1.7vw, 22px); }

/* Portfolio — fluid */
.portfolio-body { padding: clamp(18px, 2vw, 24px); }
.portfolio-title { font-size: clamp(17px, 1.7vw, 22px); }
.portfolio-desc { font-size: clamp(13px, 1.2vw, 14px); }

/* Contact — fluid */
.contact { padding: clamp(24px, 4vw, 48px); gap: clamp(24px, 4vw, 48px); }
.contact__title { font-size: clamp(24px, 3.5vw, 44px); }

/* Footer — fluid */
.footer { padding: clamp(24px, 3vw, 40px); }
.footer__inner { font-size: clamp(11px, 1.1vw, 14px); }

/* MOBILE COLLAPSE — only at very narrow widths (when grids absolutely don't fit) */
@media (max-width: 700px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero__avatar-wrap { margin: 0 0 8px; order: -1; }
  .hero__title br { display: none; }
  .about { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr; }
  .footer__inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 10px;
  }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }
}

/* ===== SETTINGS PANEL MOBILE ===== */
@media (max-width: 480px) {
  .settings__panel {
    width: calc(100vw - 28px);
    right: 14px;
    bottom: 70px;
    padding: 18px;
  }
  .theme-grid { gap: 8px; }
  .theme-card { padding: 8px; font-size: 11px; }
  .theme-preview { height: 42px; }
}

/* ===== ADMIN PANEL — TABLET ===== */
@media (max-width: 900px) {
  .admin__sheet {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    top: 0;
    border-radius: 0;
  }
  .admin__head {
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .admin__head h2 { font-size: 16px; }
  .admin__head-actions { gap: 8px; }
  .admin__apply { padding: 8px 14px !important; font-size: 12px !important; }
  .admin__close { width: 32px; height: 32px; font-size: 22px; }
  .admin__body { flex-direction: column; }
  .admin__nav {
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 14px;
    gap: 6px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .admin__nav::-webkit-scrollbar { height: 3px; }
  .admin__nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
  .admin__tab {
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 14px;
  }
  .admin__tab--danger { margin-top: 0; margin-left: auto; }
  .admin__main { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .admin__tab-pane h3 { font-size: 18px; }
  .admin__item-grid { grid-template-columns: 1fr; }
  .admin__text-row { grid-template-columns: 1fr; gap: 6px; padding: 12px; }
  .admin__text-row > label { padding-top: 0; }
  .admin__text-row .mini-grid { grid-column: 1 / 2; grid-template-columns: 1fr 90px; }
}

/* ===== ADMIN PANEL — SMALL MOBILE ===== */
@media (max-width: 480px) {
  .admin__head { padding: 12px 14px; }
  .admin__head h2 { font-size: 15px; }
  .admin__dirty { display: none; }
  .admin__apply span:last-child { display: none; }
  .admin__nav { padding: 8px 10px; gap: 4px; }
  .admin__tab { font-size: 11px; padding: 7px 10px; }
  .admin__main { padding: 14px 12px; }
  .admin__login-card { padding: 28px 22px; }
  .field input, .field textarea, .field select { padding: 10px 12px; font-size: 14px; }
}

/* ===== HORIZONTAL SCROLL PROTECTION ===== */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ===== iOS SAFE AREAS ===== */
@supports (padding: max(0px)) {
  .nav { top: max(20px, env(safe-area-inset-top)); }
  .settings { top: max(20px, env(safe-area-inset-top)); }
  @media (max-width: 1100px) {
    .settings {
      top: auto;
      bottom: max(24px, env(safe-area-inset-bottom));
    }
  }
  .footer__inner { padding-bottom: env(safe-area-inset-bottom); }
}

/* ===== TOUCH HOVER STATES ===== */
@media (hover: none) and (pointer: coarse) {
  .glass:hover::after { opacity: 0; }
  .portfolio-item:hover { transform: perspective(1400px) rotateX(0) translateY(0); }
  .timeline-item:hover { transform: none; }
  .stat:hover { transform: none; }
  .skill-group:hover { transform: none; }
  /* Tap-state instead */
  .portfolio-item:active,
  .timeline-item:active,
  .stat:active,
  .skill-group:active { border-color: var(--accent); }
}

/* ===== LANDSCAPE PHONE FIX ===== */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero__inner { padding: 80px 20px 40px; }
  .hero__avatar-wrap { width: 140px; height: 140px; }
  .intro__char { font-size: 50vmin !important; }
}

