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

:root {
    --bg: #0a0a0b;
    --bg-card: #111113;
    --bg-card-h: #18181b;
    --border: #222225;
    --text: #e4e4e7;
    --text-dim: #71717a;
    --accent: #6d28d9;
    --accent-l: #8b5cf6;
    --accent-ll: #a78bfa;
    --white: #fafafa;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --max-w: 1120px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: var(--accent-l);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--accent-ll);
}

img {
    max-width: 100%;
    display: block;
}

/* ── Noise overlay ──────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* ── Animated gradient blobs ─────────────────── */
.gradient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .12;
    animation: float 20s ease-in-out infinite alternate;
}

.gradient-bg .blob:nth-child(1) {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -10%;
    left: -10%;
}

.gradient-bg .blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: #2563eb;
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

.gradient-bg .blob:nth-child(3) {
    width: 350px;
    height: 350px;
    background: #7c3aed;
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, -40px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 50px) scale(.95);
    }
}

/* ── Container ──────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, .7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}

.navbar.scrolled {
    border-color: var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar .logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    letter-spacing: -.02em;
}

.navbar .logo span {
    color: var(--accent-l);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s;
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        background: rgba(10, 10, 11, .95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        transform: translateX(100%);
        transition: transform .35s ease;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .mobile-toggle {
        display: block;
    }
}

/* ── Sections ───────────────────────────────── */
section {
    padding: 120px 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent-l);
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent-l);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -.02em;
}

.section-subtitle {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 48px;
}

/* ── Hero ───────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
}

.hero-content {
    max-width: 720px;
}

.hero .greeting {
    font-family: var(--mono);
    font-size: .875rem;
    color: var(--accent-l);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 20px;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent-l), #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 540px;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-socials {
    display: flex;
    gap: 16px;
    margin-top: 28px;
}

.hero-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all .25s;
}

.hero-socials a:hover {
    border-color: var(--accent-l);
    color: var(--accent-l);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .hero-socials {
        justify-content: center;
    }
}

/* ── Hero Profile Photo ────────────────────── */
.hero-photo {
    position: relative;
    flex-shrink: 0;
}

.hero-photo img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--border);
    transition: border-color .4s, transform .4s;
    position: relative;
    z-index: 2;
}

.hero-photo img:hover {
    border-color: var(--accent-l);
    transform: scale(1.03);
}

.hero-photo::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #2563eb, var(--accent-l));
    opacity: .4;
    z-index: 1;
    animation: photo-glow 4s ease-in-out infinite alternate;
}

.hero-photo::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: .1;
    z-index: 0;
    filter: blur(20px);
}

@keyframes photo-glow {
    0% {
        opacity: .25;
        transform: rotate(0deg);
    }

    100% {
        opacity: .5;
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-photo {
        order: -1;
    }

    .hero-photo img {
        width: 200px;
        height: 200px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    transition: all .25s;
}

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

.btn-primary:hover {
    background: var(--accent-l);
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent-l);
    color: var(--white);
    transform: translateY(-2px);
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-hint i {
    color: var(--text-dim);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ── About ──────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text p {
    color: var(--text-dim);
    margin-bottom: 16px;
    font-size: 1.02rem;
}

.about-text p strong {
    color: var(--text);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color .25s, transform .25s;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-l);
    font-family: var(--mono);
}

.stat-card .label {
    color: var(--text-dim);
    font-size: .85rem;
    margin-top: 4px;
}

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

/* ── Achievements ───────────────────────────── */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color .25s, transform .25s;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-l));
    transform: scaleX(0);
    transition: transform .35s;
    transform-origin: left;
}

.achievement-card:hover::before {
    transform: scaleX(1);
}

.achievement-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.achievement-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(109, 40, 217, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent-l);
}

.achievement-card h3 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 8px;
}

.achievement-card p {
    font-size: .875rem;
    color: var(--text-dim);
}

/* ── Projects ───────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color .3s, transform .3s;
    display: flex;
    flex-direction: column;
}

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

.project-card .project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-card .project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(109, 40, 217, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-l);
}

.project-card .project-link {
    color: var(--text-dim);
    transition: color .2s;
}

.project-card .project-link:hover {
    color: var(--accent-l);
}

.project-card h3 {
    font-size: 1.15rem;
    color: var(--white);
    margin-bottom: 10px;
}

.project-card .desc {
    font-size: .9rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    flex: 1;
}

.project-card .challenges {
    margin-bottom: 20px;
    padding-left: 0;
    list-style: none;
}

.project-card .challenges li {
    font-size: .825rem;
    color: var(--text-dim);
    padding: 4px 0 4px 18px;
    position: relative;
}

.project-card .challenges li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-l);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    font-family: var(--mono);
    font-size: .7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(109, 40, 217, .1);
    color: var(--accent-ll);
    border: 1px solid rgba(109, 40, 217, .2);
}

/* ── Tech Stack ─────────────────────────────── */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stack-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color .25s, transform .25s;
}

.stack-group:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.stack-group h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent-l);
    margin-bottom: 16px;
    font-family: var(--mono);
}

.stack-group ul {
    list-style: none;
}

.stack-group li {
    padding: 6px 0;
    font-size: .9rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stack-group li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-l);
    flex-shrink: 0;
}

/* ── Philosophy ─────────────────────────────── */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color .25s, transform .25s;
    position: relative;
}

.philosophy-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.philosophy-card .quote-mark {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: .3;
    line-height: 1;
    margin-bottom: 8px;
}

.philosophy-card p {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 500;
    font-style: italic;
}

/* ── Contact ────────────────────────────────── */
.contact-inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.contact-inner .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: .9rem;
    transition: all .25s;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-link i {
    color: var(--accent-l);
}

/* ── Footer ─────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: .8rem;
}

/* ── Utilities ──────────────────────────────── */
@media (max-width: 500px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 80px 0;
    }
}