@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg: #0b1020;
    --surface: #131b30;
    --surface2: #18233b;
    --text: #f4f5fb;
    --muted: #a8b0c5;
    --accent: #a78bfa;
    --accent2: #7c6cf2;
    --border: #293550;
    --shadow: 0 18px 50px rgba(0, 0, 0, .22)
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65
}

a {
    color: inherit
}

.container {
    width: min(1120px, 90%);
    margin-inline: auto
}

.section {
    padding: 92px 0
}

.section-alt {
    background: #0e1629;
    padding: 92px 0
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 16, 32, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border)
}

.navbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.logo {
    font: 700 1.7rem 'Space Grotesk';
    text-decoration: none
}

.logo span,
.hero h1 span,
.section-heading h2 span {
    color: var(--accent)
}

.nav-links {
    display: flex;
    gap: 25px
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: .94rem;
    transition: .2s
}

.nav-links a:hover {
    color: var(--accent)
}

.menu-toggle,
.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer
}

.menu-toggle {
    display: none
}

.hero {
    min-height: 610px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 50px
}

.eyebrow {
    color: var(--accent);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: 3px
}

.hero h1 {
    font: 700 clamp(3rem, 7vw, 5.4rem)/1.1 'Space Grotesk';
    margin: 12px 0
}

.hero h2 {
    font: 600 clamp(1.25rem, 3vw, 1.8rem) 'Space Grotesk';
    color: #d6d9e8
}

.lead {
    max-width: 590px;
    color: var(--muted);
    margin: 20px 0 28px;
    font-size: 1.05rem
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 700;
    transition: .25s
}

.button:hover {
    transform: translateY(-3px)
}

.primary {
    background: linear-gradient(135deg, var(--accent2), #9b73ed);
    color: white
}

.secondary {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text)
}

.social-links {
    display: flex;
    gap: 17px;
    margin-top: 27px
}

.social-links a {
    font-size: 1.35rem;
    color: var(--muted)
}

.social-links a:hover {
    color: var(--accent)
}

.hero-art {
    height: 360px;
    position: relative;
    display: grid;
    place-items: center
}

.hero-portrait {
    position: relative;
    z-index: 2;
    width: 230px;
    height: 230px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(118, 96, 201, 0.8);
    box-shadow: var(--shadow);
    background: var(--surface2)
}

.orbit {
    position: absolute;
    border: 1px solid #7660c9;
    border-radius: 50%;
    transform: rotate(-25deg)
}

.orbit-one {
    width: 310px;
    height: 210px
}

.orbit-two {
    width: 380px;
    height: 260px;
    transform: rotate(35deg);
    opacity: .45
}

.code-card {
    position: relative;
    background: linear-gradient(145deg, #202d4a, #141c32);
    border: 1px solid #46527a;
    border-radius: 24px;
    padding: 38px 48px;
    box-shadow: var(--shadow);
    text-align: center
}

.code-card span {
    font: 700 4rem 'Space Grotesk';
    color: var(--accent)
}

.code-card p {
    font: 600 1.3rem 'Space Grotesk'
}

.floating-chip {
    position: absolute;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 12px;
    color: #dcd4ff;
    box-shadow: var(--shadow)
}

.chip-one {
    top: 55px;
    left: 0
}

.chip-two {
    right: 0;
    bottom: 55px
}

.section-heading {
    text-align: center;
    margin-bottom: 42px
}

.section-heading h2 {
    font: 700 clamp(2rem, 4vw, 2.7rem) 'Space Grotesk';
    margin: 8px 0
}

.section-heading>p:last-child {
    color: var(--muted)
}

.about-panel,
.skill-card,
.project-card,
.timeline-card,
.contact-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px
}

.about-panel {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap
}

.about-panel>p {
    flex: 1 1 450px;
    color: var(--muted)
}

.stat {
    min-width: 100px;
    display: grid
}

.stat strong {
    font: 700 1.8rem 'Space Grotesk';
    color: var(--accent)
}

.stat span {
    font-size: .85rem;
    color: var(--muted)
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px
}

.skill-card {
    padding: 24px
}

.skill-card i {
    font-size: 1.6rem;
    color: var(--accent)
}

.skill-card h3 {
    font: 600 1.1rem 'Space Grotesk';
    margin: 13px 0 5px
}

.skill-card p {
    font-size: .92rem;
    color: var(--muted)
}

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

.project-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform .3s, border-color .3s, box-shadow .3s
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow)
}

.project-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #29264b;
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin-bottom: 18px
}

.project-type {
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 700
}

.project-card h3,
.timeline-card h3 {
    font: 600 1.25rem 'Space Grotesk';
    margin: 8px 0
}

.project-description {
    color: var(--muted);
    font-size: .92rem;
    flex: 1
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 20px 0
}

.tags span {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: #d8d0ff;
    border-radius: 7px;
    padding: 5px 9px;
    font-size: .75rem
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px
}

.project-actions a {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 11px;
    text-decoration: none;
    font-size: .85rem
}

.project-actions a:hover,
.project-actions .demo-link {
    background: var(--accent2);
    border-color: var(--accent2);
    color: white
}

.note {
    color: var(--muted);
    font-size: .82rem;
    margin-top: 20px
}

.note code {
    color: var(--accent)
}

.timeline {
    max-width: 800px;
    margin: auto;
    display: grid;
    gap: 18px
}

.timeline-card {
    position: relative;
    padding: 25px 28px 25px 38px
}

.timeline-card h4 {
    color: #d4caff;
    font-size: .95rem;
    margin-bottom: 10px
}

.timeline-card>p:last-child {
    color: var(--muted)
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 30px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 5px #302650
}

.resume-callout {
    margin: 28px auto 0;
    max-width: 800px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 23px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px
}

.resume-callout p {
    color: var(--muted);
    font-size: .9rem
}

.contact-panel {
    max-width: 700px;
    margin: auto;
    padding: 28px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap
}

.contact-panel a {
    text-decoration: none;
    color: var(--muted)
}

.contact-panel i {
    color: var(--accent);
    margin-right: 7px
}

footer {
    border-top: 1px solid var(--border);
    padding: 23px 5%;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: var(--muted);
    font-size: .85rem
}

footer a {
    color: var(--accent);
    text-decoration: none
}

body.light-theme {
    --bg: #f5f6fc;
    --surface: #fff;
    --surface2: #eceffd;
    --text: #182039;
    --muted: #5f6880;
    --border: #dce1ef;
    --shadow: 0 18px 50px rgba(40, 50, 90, .1)
}

body.light-theme .site-header {
    background: rgba(245, 246, 252, .9)
}

body.light-theme .section-alt {
    background: #edf0fa
}

body.light-theme .hero h2 {
    color: #424b65
}

body.light-theme .project-card h3,
body.light-theme .timeline-card h3 {
    color: #182039
}

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

    .skills-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .hero {
        gap: 20px
    }

    .hero-art {
        transform: scale(.85)
    }
}

@media(max-width:680px) {

    .section,
    .section-alt {
        padding: 70px 0
    }

    .menu-toggle {
        display: block;
        margin-left: auto
    }

    .theme-toggle {
        order: 3
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        padding: 18px 5%;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 15px
    }

    .nav-links.open {
        display: flex
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 65px;
        min-height: auto
    }

    .hero-art {
        height: 280px;
        transform: scale(.78);
        margin-top: -15px
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr
    }

    .resume-callout {
        align-items: flex-start;
        flex-direction: column
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column
    }

    footer {
        flex-direction: column
    }
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s ease, transform .65s ease
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0)
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important
    }

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