/* ===== RESET & BASE VARIABLES (unchanged) ===== */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-retro: 'Press Start 2P', cursive;
  --transition: 0.2s ease;
}

/* Dark theme base (default) */
.theme-dark {
  --bg-dark: #0b0c10;
  --surface: #1f2833;
  --text: #e0e0e0;
  --text-muted: #a0a0a0;
  --border: #2c3e50;
  --header-bg: rgba(11, 12, 16, 0.95);
  --card-bg: rgba(31, 40, 51, 0.8);
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  --gradient-start: #0b0c10;
  --gradient-mid: #1a1a2e;
  --gradient-end: #16213e;
  --dropdown-bg: #1f2937;
  --dropdown-hover: #374151;
}

/* Light theme base */
.theme-light {
  --bg-dark: #f5f5f7;
  --surface: #ffffff;
  --text: #1e1e2f;
  --text-muted: #4a4a5a;
  --border: #d1d5db;
  --header-bg: rgba(255, 255, 255, 0.95);
  --card-bg: rgba(255, 255, 255, 0.7);
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  --gradient-start: #e0e7ff;
  --gradient-mid: #f5f0ff;
  --gradient-end: #ffe9f0;
  --dropdown-bg: #ffffff;
  --dropdown-hover: #f3f4f6;
}

/* Accent colors (common for both themes) */
.accent-purple {
  --primary: #7b2cbf;
  --primary-light: #9d4edd;
  --accent: #64dfdf;
}
.accent-pink {
  --primary: #b23b7a;
  --primary-light: #d44d9d;
  --accent: #ff8cae;
}
.accent-black {
  --primary: #2d2d2d;
  --primary-light: #4a4a4a;
  --accent: #a0a0a0;
}
.accent-gray {
  --primary: #495057;
  --primary-light: #6c757d;
  --accent: #adb5bd;
}

/* Light theme accent overrides */
.theme-light.accent-purple {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --accent: #2dd4bf;
}
.theme-light.accent-pink {
  --primary: #ec4899;
  --primary-light: #f472b6;
  --accent: #fb7185;
}
.theme-light.accent-black {
  --primary: #374151;
  --primary-light: #6b7280;
  --accent: #9ca3af;
}
.theme-light.accent-gray {
  --primary: #6b7280;
  --primary-light: #9ca3af;
  --accent: #d1d5db;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* ===== ANIMATED BACKGROUND ===== */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(125deg, 
    var(--gradient-start) 0%, 
    var(--gradient-mid) 40%, 
    var(--gradient-end) 80%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  transition: background 0.3s;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Particles (normal floating dots) */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: float 10s infinite linear;
}

.theme-light .particle {
  background: rgba(0, 0, 0, 0.1);
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* ===== SEASONAL EFFECTS ===== */
.seasonal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.snowflake, .leaf, .sun-ray, .easter-egg, .santa-hat, .blossom, .confetti, .matrix-char {
  position: absolute;
  user-select: none;
  opacity: 0.8;
  animation: fall linear infinite;
}

.snowflake {
  color: #fff;
  font-size: 1rem;
}
.leaf {
  color: #d4a373;
  font-size: 1.2rem;
}
.sun-ray {
  color: #fbbf24;
  font-size: 1.2rem;
  animation: fall linear infinite;
  filter: drop-shadow(0 0 2px #fbbf24);
}

.easter-egg {
  color: #f9a8d4;
  font-size: 1.2rem;
}
.santa-hat {
  color: #ef4444;
  font-size: 1.2rem;
}

.theme-light .snowflake {
  color: #aaccff;
}

.blossom {
  color: #ffb7c5;
  font-size: 1.2rem;
}
.confetti {
  color: #fbbf24;
  font-size: 1.2rem;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
  }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ===== HEADER (updated for compact dropdown) ===== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0.5rem 1rem;
  transition: background 0.3s, border-color 0.3s;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-text {
  font-family: var(--font-retro);
  font-size: 1.2rem;
  color: var(--primary-light);
  text-shadow: 0 0 5px var(--primary);
}

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

/* Theme Dropdown - compact and right-aligned */
.theme-dropdown {
  position: relative;
  margin-left: auto;    /* push to the right */
  margin-right: 1rem;
}

.dropdown-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.8rem;   /* smaller padding */
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;       /* smaller font */
  transition: all 0.2s;
}

.dropdown-toggle:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.dropdown-toggle i {
  font-size: 0.7rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.8rem;
  min-width: 200px;          /* narrower */
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 100;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-section {
  margin-bottom: 0.8rem;
}

.dropdown-section h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preset-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem;
}

.preset-item {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.5rem;    /* smaller */
  border-radius: 30px;
  font-size: 0.75rem;        /* smaller */
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.preset-item:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.preset-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.seasonal-select {
  width: 100%;
  padding: 0.3rem;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

/* Menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 0.25rem;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--primary-light);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s;
}

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

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .main-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  .main-nav.active {
    max-height: 300px;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
  }
  .theme-dropdown {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ===== MAIN CONTAINER (unchanged) ===== */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ===== CARDS (unchanged) ===== */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  border-color: var(--primary-light);
}

.card h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-light);
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

.card h3 {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem;
  color: var(--accent);
}

.card p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.card img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 1rem;
  border: 1px solid var(--border);
}

/* ===== TABLES (unchanged) ===== */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  transition: background 0.3s;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(123, 44, 191, 0.2);
}

.skill-table td:nth-child(3) {
  font-family: var(--font-retro);
  font-size: 0.8rem;
}

.contact-table i {
  margin-right: 0.5rem;
  color: var(--accent);
  width: 1.5rem;
}

.setup-table i {
  margin-right: 0.75rem;
  color: var(--primary-light);
}

/* ===== TABS (unchanged) ===== */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab-nav.small .tab-btn {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 40px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(123, 44, 191, 0.2);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tab-content {
  display: none;
  animation: fade 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ===== GOALS LIST (unchanged) ===== */
.goals-list {
  list-style: none;
  padding-left: 1rem;
}

.goals-list li {
  margin: 0.75rem 0;
  position: relative;
  padding-left: 2rem;
}

.goals-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

/* ===== SCROLL TOP BUTTON (unchanged) ===== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

/* ===== SECTION HIGHLIGHT ANIMATION ===== */
@keyframes sectionPulse {
  0% {
    box-shadow: 0 0 0 0 var(--primary);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(123, 44, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 44, 191, 0);
  }
}

.section-highlight {
  animation: sectionPulse 1s ease-out;
}

/* ===== FOOTER (unchanged) ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: border-color 0.3s;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-light);
  padding: 0.5rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 1rem 0;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

#databaseInfo {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 400px;
  transition: background 0.3s;
}

#databaseInfo ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

#databaseInfo a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

#databaseInfo a:hover {
  text-decoration: underline;
}

/* ===== LINKS ===== */
a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 600px) {
  .card {
    padding: 1.2rem;
  }
  .card h2 {
    font-size: 1.6rem;
  }
  .tab-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
  .scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* ===== CAROUSEL ===== */
.carousel-container {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.carousel-slide {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.carousel-slide.active {
  display: block;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 0 8px 8px 0;
  transition: background 0.2s;
  z-index: 10;
}

.carousel-next {
  right: 0;
  border-radius: 8px 0 0 8px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-dots {
  text-align: center;
  position: absolute;
  bottom: 10px;
  width: 100%;
  z-index: 10;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dot.active,
.dot:hover {
  background-color: white;
}