:root {
  --bg-color: #ffffff;
  --text-color: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(226, 232, 240, 0.8);
  --avatar-grad: linear-gradient(135deg, #0ea5e9, #38bdf8);
  --shadow-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg-color: #030712;
  --text-color: #f8fafc;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --avatar-grad: linear-gradient(135deg, #6366f1, #a855f7);
  --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.preloader {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #0f172a; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.fade-out { opacity: 0; visibility: hidden; }

.code-editor-mockup {
  width: 90%; max-width: 500px;
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  font-family: monospace;
}

.editor-header {
  display: flex; align-items: center; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.editor-title { margin: 0 auto; font-size: 12px; color: rgba(255, 255, 255, 0.4); }
.editor-body { padding: 20px; margin: 0; font-size: 14px; color: #38bdf8; line-height: 1.5; white-space: pre-wrap; }
.typing-cursor { display: inline-block; animation: blink 0.8s infinite; color: #38bdf8; font-weight: bold; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.controls-bar { position: absolute; top: 20px; right: 20px; z-index: 10; }

.theme-switch-wrapper {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-icon-left, .theme-icon-right { display: flex; align-items: center; opacity: 0.8; }
.theme-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(100, 116, 139, 0.3); transition: .3s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.theme-switch input:checked + .slider { background-color: #38bdf8; }
.theme-switch input:checked + .slider:before { transform: translateX(16px); }

.sky { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }

[data-theme="light"] { background: #ffffff; }
.sun-ray { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.4; pointer-events: none; }
.ray-1 { width: 300px; height: 300px; background: rgba(56, 189, 248, 0.15); top: -50px; right: -50px; }
.ray-2 { width: 400px; height: 400px; background: rgba(14, 165, 233, 0.1); bottom: -100px; left: -100px; }

[data-theme="dark"] { background: #030712; }
[data-theme="dark"] .sun-ray { display: none; }

.page { max-width: 600px; width: 100%; margin: 0 auto; padding: 80px 20px 40px; box-sizing: border-box; display: flex; flex-direction: column; gap: 20px; }

.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); border-radius: 24px; padding: 32px;
  box-shadow: 0 8px 32px var(--shadow-color); transition: background 0.5s ease, border 0.5s ease, box-shadow 0.5s ease;
}

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: #0ea5e9; margin-bottom: 24px;
}

[data-theme="dark"] .status { color: #38bdf8; }

.status-dot { width: 8px; height: 8px; background-color: #0ea5e9; border-radius: 50%; box-shadow: 0 0 8px #0ea5e9; animation: pulse 2s infinite; }
[data-theme="dark"] .status-dot { background-color: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px currentColor; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.profile-image {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--avatar-grad);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: background 0.5s ease;
}

.profile-letter { font-size: 36px; font-weight: bold; color: #ffffff; }

h1 { margin: 0 0 12px; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.hero-description { margin: 0 0 28px; font-size: 15px; opacity: 0.75; line-height: 1.5; }

.socials { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }

.social {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(100, 116, 139, 0.05); border: 1px solid var(--glass-border);
  padding: 10px 18px; border-radius: 12px; color: var(--text-color);
  text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.3s ease;
}

.social:hover { background: rgba(100, 116, 139, 0.1); border-color: rgba(100, 116, 139, 0.2); transform: translateY(-2px); }
.icon { width: 18px; height: 18px; fill: currentColor; }

footer {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}