/* C:\AppServ\www\main\css\style.css */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* --- Root Variables & Theme Tokens --- */
:root {
    /* Color Palette - Premium Reddish Brown Dark Theme */
    --bg-primary: #111111;
    --bg-secondary: #111111;
    --bg-tertiary: #1f1f1f;
    --accent-blue: #c44d34;
    --accent-teal: #b8684c;
    --accent-purple: #8d311b;
    --accent-coral: #e0553c;

    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #909090;

    --glass-bg: #1f1f1f;
    --glass-border: #2d2d2d;
    --glass-shadow: rgba(0, 0, 0, 0.25);

    --gradient-primary: linear-gradient(135deg, #c44d34 0%, #8d311b 100%);
    --gradient-glow: none;

    --font-heading: 'Outfit', 'Prompt', sans-serif;
    --font-body: 'Sarabun', 'Prompt', sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --hero-bg-glow: #1f1f1f;
    --hero-bg-base: #111111;

    --border-radius-sm: 2px;
    --border-radius-md: 4px;
    --border-radius-lg: 4px;
}

/* Light Mode Variables override */
:root.light-mode {
    --bg-primary: #faf5f3;
    --bg-secondary: #faf5f3;
    --bg-tertiary: #f2e6e2;
    --accent-blue: #8d311b;
    --accent-teal: #a1523c;
    --accent-purple: #6f200e;
    --accent-coral: #d83b01;

    --text-primary: #242424;
    --text-secondary: #505050;
    --text-muted: #707070;

    --glass-bg: #ffffff;
    --glass-border: #e6e6e6;
    --glass-shadow: rgba(0, 0, 0, 0.06);

    --gradient-primary: linear-gradient(135deg, #8d311b 0%, #6f200e 100%);
    --gradient-glow: none;

    --hero-bg-glow: #ffffff;
    --hero-bg-base: #faf3f0;

    --border-radius-sm: 2px;
    --border-radius-md: 4px;
    --border-radius-lg: 4px;
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
}

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

ul {
    list-style: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Global Layout Helpers --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: var(--gradient-primary);
}

.section-title p {
    margin-top: 15px;
    font-size: 1.125rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Glassmorphic Containers --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    transition: transform var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px 0 rgba(59, 130, 246, 0.15);
}

/* --- Buttons & UI Elements --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

/* Badge styling */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.05em;
}

.badge-software {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-hardware {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s);
}

.badge-icon:hover {
    transform: scale(1.1);
}

/* --- Decorative Animations & Background Glows --- */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-glow);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.bg-glow-1 {
    top: -100px;
    right: -200px;
}

.bg-glow-2 {
    bottom: -100px;
    left: -200px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-element {
    animation: float 4s ease-in-out infinite;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {

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

    .section {
        padding: 50px 0;
    }

    h1 {
        font-size: 2rem;
    }
}