/* ============================================
   Miwnix Tech — Base Styles
   Variables, Reset, Typography, Utilities
   ============================================ */

:root {
    /* Default Theme (Neon Cyber) */
    --primary: #00f2ff;
    --secondary: #bd00ff;
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

/* --- Canvas Background (Global) --- */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Ensure clicks pass through */
}

[data-theme="sunset"] {
    --primary: #ff4d4d;
    --secondary: #fca311;
    --bg-dark: #1a0505;
    --bg-card: rgba(255, 255, 255, 0.05);
}

[data-theme="ocean"] {
    --primary: #00b4d8;
    --secondary: #0077b6;
    --bg-dark: #000814;
    --bg-card: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Kanit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Layout & Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 50px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
}

/* Fix Header Overlap on Scroll */
section[id] {
    scroll-margin-top: 100px;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Generic Theme Dropdown --- */
.theme-dropdown {
    position: relative;
    display: inline-block;
}

.theme-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 160px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2);
    z-index: 1000;
    transform: translateY(10px);
}

.theme-dropdown:hover .dropdown-menu,
.theme-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(15px);
}

.theme-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.theme-dropdown .dropdown-menu li {
    display: block;
    width: 100%;
}

.theme-dropdown .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #ccc;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-dropdown .dropdown-menu li:last-child a {
    border-bottom: none;
}

.theme-dropdown .dropdown-menu a:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
    padding-left: 25px;
}