/* ===== ROOT COLORS ===== */
:root {
  --bg: #07070a;
  --card: #0f1317cc;
  --glass: rgba(255, 255, 255, 0.04);
  --neon: #00a3ff;
  --accent: #7b2cff;
  --muted: #9aa4b2;
  --glass-border: rgba(255, 255, 255, 0.06);
  --success: #4ade80;
  --danger: #f87171;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg: #f5f7fa;
  --card: #ffffff;
  --glass: rgba(0, 0, 0, 0.04);
  --neon: #0066cc;
  --accent: #6b3fa0;
  --muted: #666666;
  --glass-border: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] html,
[data-theme="light"] body {
  background: radial-gradient(ellipse at 20% 10%, rgba(0, 102, 204, 0.04), transparent 8%),
    radial-gradient(ellipse at 80% 90%, rgba(107, 63, 160, 0.03), transparent 12%), var(--bg);
  color: #333333;
}

[data-theme="light"] p {
  color: #555555;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #1a1a1a;
}

[data-theme="light"] nav {
  background: rgba(245, 247, 250, 0.8);
  border-bottom-color: var(--glass-border);
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
}

[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--glass-border);
  color: #333333;
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--neon);
}

[data-theme="light"] .nav-links a {
  color: var(--muted);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  color: var(--neon);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
  color: #333333;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

[data-theme="light"] label {
  color: var(--muted);
}

[data-theme="light"] .card {
  background: linear-gradient(180deg, var(--card), rgba(0, 0, 0, 0.01));
}

[data-theme="light"] .modal {
  background: linear-gradient(180deg, var(--card), rgba(0, 0, 0, 0.01));
}

[data-theme="light"] .video-portfolio-card {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .video-portfolio-card:hover {
  border-color: rgba(0, 102, 204, 0.3);
  box-shadow: 0 12px 48px rgba(0, 102, 204, 0.15);
}

[data-theme="light"] .video-portfolio-card-title {
  color: #1a1a1a;
}

[data-theme="light"] .video-portfolio-card-description {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .video-portfolio-card-play-icon {
  background: rgba(0, 102, 204, 0.15);
  border-color: rgba(0, 102, 204, 0.3);
}

[data-theme="light"] .video-portfolio-card-play-icon::after {
  color: #0066cc;
}

[data-theme="light"] .video-portfolio-card:hover .video-portfolio-card-play-icon {
  background: rgba(0, 102, 204, 0.25);
  border-color: #0066cc;
}

/* ===== RESET & FOUNDATION ===== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at 20% 10%, rgba(0, 163, 255, 0.04), transparent 8%),
    radial-gradient(ellipse at 80% 90%, rgba(123, 44, 255, 0.03), transparent 12%), var(--bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #e6f0ff;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
}

h2 {
  font-size: clamp(24px, 5vw, 36px);
}

h3 {
  font-size: clamp(18px, 4vw, 24px);
}

p {
  margin: 0;
  color: #bcdffb;
}

.lead {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.8;
  max-width: 680px;
  letter-spacing: 0.3px;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
}

.content-width {
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(7, 7, 10, 0.8);
  border-bottom: 1px solid var(--glass-border);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: '◆';
  font-size: 20px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--accent));
  transition: width 0.3s ease-out;
}

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--neon), var(--accent));
  box-shadow: 0 6px 30px rgba(0, 163, 255, 0.12);
  border: none;
  color: #031026;
}

.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(0, 163, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--neon);
}

.btn-outline:hover {
  background: rgba(0, 163, 255, 0.1);
  border-color: var(--neon);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--muted);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e6f0ff;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== CARDS ===== */
.card {
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 48px rgba(0, 163, 255, 0.08);
  transform: translateY(-4px);
}

.card.featured {
  background: linear-gradient(135deg, rgba(0, 163, 255, 0.08), rgba(123, 44, 255, 0.05));
  border: 1px solid rgba(0, 163, 255, 0.1);
}

/* ===== BADGES & PILLS ===== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.badge.primary {
  background: rgba(0, 163, 255, 0.1);
  border-color: rgba(0, 163, 255, 0.2);
  color: var(--neon);
}

.badge.accent {
  background: rgba(123, 44, 255, 0.1);
  border-color: rgba(123, 44, 255, 0.2);
  color: #d0a4ff;
}

.badge.success {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

/* ===== INPUTS & FORMS ===== */
input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #e6f0ff;
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 16px;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* ===== FLEXBOX UTILITIES ===== */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 12px;
}
.gap-3 {
  gap: 16px;
}
.gap-4 {
  gap: 24px;
}

/* ===== SPACING UTILITIES ===== */
.section {
  margin-top: 50px;
  margin-bottom: 0;
}

.section-small {
  margin-top: 40px;
  margin-bottom: 40px;
}

.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 12px;
}
.mt-3 {
  margin-top: 16px;
}
.mt-4 {
  margin-top: 24px;
}
.mt-6 {
  margin-top: 36px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px rgba(0, 163, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 163, 255, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 163, 255, 0.3);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition);
}

/* ===== LOADING STATES ===== */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon);
}

/* ===== TOOLTIPS ===== */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background: var(--card);
  color: #e6f0ff;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  border: 1px solid var(--glass-border);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .container {
    padding: clamp(20px, 4vw, 36px);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .section {
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .nav-links {
    gap: 16px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted);
}

.text-neon {
  color: var(--neon);
}

.text-accent {
  color: var(--accent);
}

.text-small {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.rounded {
  border-radius: 10px;
}

.rounded-full {
  border-radius: 999px;
}

.border {
  border: 1px solid var(--glass-border);
}

.shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shadow-lg {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.overflow-hidden {
  overflow: hidden;
}

.invisible {
  display: none;
}

.pointer-events-none {
  pointer-events: none;
}
