/* =========================
   GLOBAL BASE STYLES
========================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f6f8fb;
    color: #2c2c2c;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth global transition */
* {
    box-sizing: border-box;
}

/* =========================
   TYPOGRAPHY
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

p {
    line-height: 1.7;
    color: #555;
}

/* =========================
   LAYOUT
========================= */

section {
    padding: 20px 0;
    margin-bottom: 30px;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-link {
    color: #444;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #0d6efd;
}

.nav-link.active {
    font-weight: 600;
    color: #0d6efd !important;
}

/* Logo */
.navbar-logo {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* =========================
   CARDS & BOXES
========================= */

.card,
.border,
.shadow-sm {
    border-radius: 14px !important;
    transition: all 0.3s ease;
}

/* soft shadow */
.shadow-sm {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
}

/* =========================
   BADGES
========================= */

.badge {
    font-weight: 500;
    padding: 6px 10px;
}

/* =========================
   LIGHT MODE FIXES
========================= */

.text-muted {
    color: #6c757d !important;
}

/* =========================
   DARK MODE (ROOT LEVEL)
   IMPORTANT: html.dark-mode
========================= */

html.dark-mode body {
    background: #121212;
    color: #eaeaea;
}

/* Navbar dark */
html.dark-mode .navbar {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #2a2a2a;
}

/* Links */
html.dark-mode .nav-link {
    color: #cfcfcf !important;
}

html.dark-mode .nav-link:hover {
    color: #ffffff !important;
}

html.dark-mode .nav-link.active {
    color: #00d4ff !important;
}

/* Cards */
html.dark-mode .card,
html.dark-mode .border,
html.dark-mode .shadow-sm {
    background-color: #1c1c1c !important;
    color: #eaeaea;
    border-color: #2a2a2a !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
}

/* Muted text */
html.dark-mode .text-muted {
    color: #a0a0a0 !important;
}

/* Badges */
html.dark-mode .badge {
    background-color: #2a2a2a !important;
    color: #ddd !important;
}

/* Sections separation */
html.dark-mode section {
    border-bottom: 1px solid #222;
}

/* =========================
   EXTRA UX POLISH
========================= */

/* buttons hover smooth */
button,
.btn {
    transition: all 0.2s ease;
}

/* links smooth */
a {
    text-decoration: none;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #444;
}

/* hover */
.theme-toggle:hover {
    transform: scale(1.1);
}

/* dark mode */
html.dark-mode .theme-toggle {
    color: #fff;
}