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

:root {
    --accent: #007eb0;
    --accent-light: #00a8e8;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2230;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(13, 17, 23, 0.85);
    --nav-mobile-bg: rgba(13, 17, 23, 0.95);
    --hover-bg: rgba(255, 255, 255, 0.06);
    --btn-outline-border: rgba(255, 255, 255, 0.2);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Fira Sans', sans-serif;
}

[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #e9ecf0;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #555e6e;
    --border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(245, 247, 250, 0.85);
    --nav-mobile-bg: rgba(245, 247, 250, 0.95);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --btn-outline-border: rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 4px 20px rgba(0, 126, 176, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--btn-outline-border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    box-shadow: 0 4px 20px rgba(0, 126, 176, 0.15);
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    z-index: 200;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Sections */
section {
    padding: 5rem 2rem;
    scroll-margin-top: 80px;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 650px;
    font-weight: 300;
    line-height: 1.7;
}

.section-header {
    margin-bottom: 3rem;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: var(--accent-light);
    border-color: var(--accent);
    background: var(--hover-bg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

.theme-toggle .icon-moon {
    display: inline;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: inline;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    background: var(--bg-secondary);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.footer-socials a:hover {
    color: var(--accent-light);
}

.footer-socials svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

[data-theme="light"] .footer-socials svg {
    fill: var(--text-secondary);
}

/* Responsive - shared */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-mobile-bg);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}