:root {
    --bg: #0a0a0f;
    --surface: #11111a;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #7b6ef6;
    --accent2: #e8c56d;
    --text: #e8e6f0;
    --muted: #6b6880;
    --card: rgba(255, 255, 255, 0.03);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    cursor: none;
}


/* ── Custom cursor ─────────────────────────────────────── */

.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    mix-blend-mode: screen;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(123, 110, 246, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s;
}

body:hover .cursor {
    opacity: 1;
}


/* ── Noise overlay ─────────────────────────────────────── */

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


/* ── Grid lines ────────────────────────────────────────── */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}


/* ── Nav ───────────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.7);
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

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

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s;
}

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


/* ── Hero ──────────────────────────────────────────────── */

.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 3rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.2s forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--accent);
}

.hero-name {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3.5rem, 9vw, 8rem);
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.4s forwards;
}

.hero-name em {
    font-style: italic;
    color: var(--accent2);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--muted);
    font-weight: 400;
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.6s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s 0.8s forwards;
}

.btn {
    padding: 0.9rem 2rem;
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.25s ease;
    cursor: none;
}

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

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

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

.btn-ghost:hover {
    border-color: var(--text);
}


/* ── Hero badge ────────────────────────────────────────── */

.hero-badge {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 160px;
    opacity: 0;
    animation: fadeIn 1s 1s forwards, spin 18s linear infinite;
}

.hero-badge svg {
    width: 100%;
    height: 100%;
}


/* ── Sections ──────────────────────────────────────────── */

section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 3rem;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 80px;
}


/* ── About ─────────────────────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.3s, transform 0.3s;
}

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

.stat-card .num {
    font-family: 'DM Serif Display', serif;
    font-size: 2.8rem;
    color: var(--accent2);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-card .label {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}


/* ── Skills ────────────────────────────────────────────── */

.skills-section {
    border-top: 1px solid var(--border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.skill-card:hover {
    transform: translateY(-6px);
    border-color: rgba(123, 110, 246, 0.3);
}

.skill-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(123, 110, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.skill-card p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.2rem;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 0.25rem 0.7rem;
    border-radius: 2px;
    background: rgba(123, 110, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(123, 110, 246, 0.2);
}


/* ── Projects ──────────────────────────────────────────── */

.projects-section {
    border-top: 1px solid var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    border-color: rgba(232, 197, 109, 0.3);
    transform: translateY(-5px);
}

.project-num {
    font-family: 'DM Serif Display', serif;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-right: 3rem;
}

.project-card p {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.project-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link::after {
    content: '→';
    transition: transform 0.2s;
}

.project-card:hover .project-link::after {
    transform: translateX(4px);
}


/* ── Contact ───────────────────────────────────────────── */

.contact-section {
    border-top: 1px solid var(--border);
    text-align: center;
}

.contact-section h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
}

.contact-section p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.25s;
}

.social-link:hover {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(123, 110, 246, 0.05);
}


/* ── Footer ────────────────────────────────────────────── */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 3rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}


/* ── Animations ────────────────────────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

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

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


/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
    nav {
        padding: 1.2rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
    section {
        padding: 4rem 1.5rem;
    }
    .hero {
        padding: 7rem 1.5rem 3rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-badge {
        display: none;
    }
}