:root {
    --bg: #0f1724;
    --card: #0b1220;
    --text: #e6eef8;
    --muted: #9aa8bd;
    --accent: #7c5cff;
    --accent-2: #2ab7ff;
    --glass: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] {
    --bg: #f7fafc;
    --card: #ffffff;
    --text: #0b1220;
    --muted: #556070;
    --accent: #5b21b6;
    --accent-2: #0ea5e9;
    --glass: rgba(11, 18, 32, 0.04);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, var(--bg), #071026);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent);
    backdrop-filter: blur(6px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0
}

.logo {
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    font-weight: 600
}

.nav a:hover {
    color: var(--text);
    background: var(--glass)
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 1.2rem
}

.theme-toggle {
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 1.1rem
}

/* Hero */
.hero {
    padding: 84px 0 48px
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    margin: 0
}

.hero .lead {
    color: var(--muted);
    max-width: 60ch
}

.accent {
    color: var(--accent);
    margin-left: 6px
}

.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 12px
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: white
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text)
}

.btn.small {
    padding: 8px 10px;
    font-size: 0.9rem;
    border-radius: 8px
}

/* About */
.about {
    padding: 48px 0
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 18px
}

.card {
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6)
}

/* Projects */
.projects {
    padding: 48px 0
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px
}

.project-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 220px
}

.project-thumb {
    height: 120px
}

.project-body {
    padding: 14px
}

.project-body h3 {
    margin: 0 0 8px 0
}

.project-links {
    display: flex;
    gap: 8px;
    margin-top: 12px
}

/* Skills */
.skills {
    padding: 48px 0
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.chip {
    background: var(--card);
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 600
}

/* Contact */
.contact {
    padding: 48px 0
}

/* Footer */
.site-footer {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 40px
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: all 520ms cubic-bezier(.22, .99, .36, 1)
}

.reveal.revealed {
    opacity: 1;
    transform: none
}

/* Responsive */
@media (max-width:900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .about-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:640px) {
    .projects-grid {
        grid-template-columns: 1fr
    }

    .menu-toggle {
        display: inline-block
    }

    .nav {
        position: fixed;
        right: 12px;
        top: 64px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.6));
        padding: 12px;
        border-radius: 10px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: all 240ms ease
    }

    .nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: none
    }

    .nav ul {
        flex-direction: column;
        gap: 8px
    }

    .header-inner {
        gap: 8px
    }
}

/* Utilities */
.name {
    font-weight: 800;
    color: var(--text)
}

.muted {
    color: var(--muted)
}