:root {
    --bg: #08080c;
    --surface: #101017;
    --surface-light: #171720;
    --text: #f5f5f7;
    --muted: #9a9aa7;
    --purple: #9b6cff;
    --purple-light: #b998ff;
    --border: #24242e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--purple);
    color: white;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s;
}

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

:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 2px;
}


/* HEADER */

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--purple);
}

nav {
    display: flex;
    gap: 28px;
}

nav a {
    color: var(--muted);
    font-size: 14px;
    transition: 0.2s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    border-radius: 2px;
}


/* HERO */

.hero {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--purple);
    opacity: 0.08;
    filter: blur(140px);
    top: 10%;
    left: -100px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

.eyebrow,
.section-label {
    color: var(--purple-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(48px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -4px;
}

.hero h1 span,
h2 span {
    color: var(--purple-light);
}

.hero-description {
    max-width: 600px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}

.button.primary {
    background: var(--purple);
    color: white;
}

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

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

.button.secondary:hover {
    background: var(--surface);
}

.button.ghost {
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.button.ghost:hover {
    border-color: var(--purple);
    color: var(--purple-light);
}

.button.small {
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


/* HERO AVATAR */

.hero-card {
    position: relative;
}

.profile-avatar {
    position: absolute;
    top: -22px;
    right: 28px;
    z-index: 2;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px solid var(--purple);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.profile-avatar.has-photo {
    border-color: var(--border);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar span {
    font-size: 22px;
    font-weight: 800;
    color: var(--purple-light);
}


/* TERMINAL */

.terminal {
    background: #0d0d12;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.terminal-top {
    display: flex;
    gap: 7px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.terminal-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #44444e;
}

.terminal-body {
    padding: 24px;
    font-family: monospace;
    font-size: 14px;
}

.terminal-body p {
    margin-bottom: 10px;
}

.purple {
    color: var(--purple-light);
}

.blue {
    color: #7db8ff;
}

.output {
    color: #8ee6a8;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* SECTIONS */

.section {
    padding: 120px 0;
    border-top: 1px solid var(--border);
}

.section h2 {
    margin-top: 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -2px;
}

.section-description {
    max-width: 700px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 17px;
}


/* SKILLS */

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

.skill {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    transition: 0.2s;
}

.skill:hover {
    border-color: var(--purple);
    color: var(--text);
    transform: translateY(-2px);
}


/* PROJECTS */

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

.project-card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: 0.25s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #40345c;
}

.project-number {
    color: var(--purple);
    font-family: monospace;
    font-size: 13px;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 20px;
    display: block;
}

.project-card h3 {
    margin-top: 24px;
    font-size: 22px;
}

.project-card h3 a:hover {
    color: var(--purple-light);
}

.project-card p {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 24px;
}

.tags span {
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--surface-light);
    color: var(--purple-light);
    font-size: 11px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}


/* CONTACT */

.contact {
    text-align: center;
}

.contact .section-description {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 32px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.contact-link:hover {
    color: var(--purple-light);
}


/* FOOTER */

footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}


/* TABLET */

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


/* MOBILE */

@media (max-width: 800px) {
    .nav-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    nav.is-open {
        max-height: 240px;
    }

    nav a {
        padding: 16px 20px;
        border-top: 1px solid var(--border);
    }

    .header {
        position: sticky;
    }

    .nav {
        position: relative;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-buttons {
        flex-wrap: wrap;
    }

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

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
}


@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}