:root {
    --bg: #080b14;
    --surface: #0e1320;
    --surface2: #141927;
    --accent: #4f8fff;
    --accent2: #a78bfa;
    --accent3: #38bdf8;
    --text: #e8edf8;
    --muted: #7a8aaa;
    --border: rgba(79, 143, 255, 0.15);
    --glow: rgba(79, 143, 255, 0.35);
    --card-bg: rgba(14, 19, 32, 0.85);
}

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

html {
    scroll-behavior: smooth;
}

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

/* ─── CUSTOM CURSOR ─── */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width .2s, height .2s, background .2s;
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

#cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(79, 143, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width .3s, height .3s, border-color .3s;
}

body:has(a:hover) #cursor-dot,
body:has(button:hover) #cursor-dot {
    width: 14px;
    height: 14px;
    background: var(--accent2);
}

body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
    width: 52px;
    height: 52px;
    border-color: var(--accent2);
}

/* ─── STARS / BG ─── */
#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79, 143, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 60%),
        var(--bg);
    pointer-events: none;
}

#stars::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 15%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 10%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 10% 90%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 55%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 45%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 65%, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
}

/* ─── GRID OVERLAY ─── */
#grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(79, 143, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 143, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ─── LAYOUT ─── */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* ─── HEADER ─── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: .9rem 0;
    background: rgba(8, 11, 20, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

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

.nav-links a {
    font-size: .88rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color .25s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width .3s;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* ─── HERO ─── */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(79, 143, 255, 0.1);
    border: 1px solid rgba(79, 143, 255, 0.25);
    border-radius: 100px;
    padding: .35rem 1rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
    animation: fadeSlideUp .8s ease both;
}

.hero-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .4;
        transform: scale(1.3)
    }
}

h1.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
    animation: fadeSlideUp .8s .1s ease both;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2.5rem;
    animation: fadeSlideUp .8s .2s ease both;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeSlideUp .8s .3s ease both;
}

.btn-primary {
    padding: .85rem 2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: none;
    cursor: none;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 24px rgba(79, 143, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 40px rgba(79, 143, 255, 0.5);
}

.btn-ghost {
    padding: .85rem 2rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
    cursor: none;
    transition: border-color .2s, transform .2s, background .2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: rgba(79, 143, 255, 0.07);
    transform: translateY(-3px);
}

/* floating 3d blobs */
.hero-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: floatBlob 8s ease-in-out infinite;
}

.blob1 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.blob2 {
    width: 400px;
    height: 400px;
    background: var(--accent2);
    bottom: -80px;
    right: 20%;
    animation-delay: -3s;
}

.blob3 {
    width: 300px;
    height: 300px;
    background: var(--accent3);
    top: 40%;
    left: -80px;
    animation-delay: -5s;
}

@keyframes floatBlob {

    0%,
    100% {
        transform: translateY(0) scale(1)
    }

    50% {
        transform: translateY(-30px) scale(1.05)
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ─── SECTION TITLES ─── */
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: .5rem;
}

.section-sub {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 3.5rem;
}

.section-label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .6rem;
}

section {
    padding: 7rem 0;
}

/* ─── ABOUT ─── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 5rem;
    align-items: center;
}

.about-img-wrap {
    position: relative;
    perspective: 1000px;
}

.about-img-card {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transform-style: preserve-3d;
    transition: transform .1s ease-out;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.about-img-card img {
    width: 100%;
    display: block;
}

.about-img-glow {
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(79, 143, 255, 0.3), rgba(167, 139, 250, 0.2));
    z-index: -1;
    filter: blur(20px);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: .5
    }

    50% {
        opacity: 1
    }
}

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

.stats-row {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: .8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ─── SKILLS ─── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .15s ease-out, box-shadow .3s;
    cursor: default;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 143, 255, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s;
}

.skill-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(79, 143, 255, 0.3), 0 0 40px rgba(79, 143, 255, 0.1);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon {
    height: 44px;
    margin-bottom: 1rem;
}

.skill-icon img {
    height: 100%;
    object-fit: contain;
}

.skill-icon img.white-bg {
    background-color: white;
    border-radius: 10px;
    padding: 2px 10px;
}

.skill-card h3 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .5rem;
}

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

/* ─── EXPERIENCE TIMELINE ─── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent), var(--accent2), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    animation: fadeSlideUp .6s ease both;
}

.timeline-dot {
    position: absolute;
    left: -2.45rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 0 0 4px rgba(79, 143, 255, 0.15), 0 0 20px var(--glow);
    z-index: 2;
}

.timeline-period {
    font-size: .78rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .5rem;
    padding-left: 0.5rem;
}

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    transform-style: preserve-3d;
    transition: transform .15s ease-out, box-shadow .3s;
}

.timeline-card:hover {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(79, 143, 255, 0.25);
}

.timeline-role {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .25rem;
}

.timeline-company {
    font-size: .9rem;
    color: var(--accent2);
    font-weight: 500;
    margin-bottom: .8rem;
}

.timeline-desc {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.7;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1rem;
}

.tag {
    font-size: .72rem;
    padding: .2rem .7rem;
    border-radius: 100px;
    background: rgba(79, 143, 255, 0.1);
    border: 1px solid rgba(79, 143, 255, 0.2);
    color: var(--accent);
    font-weight: 500;
}

/* ─── PROJECTS ─── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.4rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .15s ease-out, box-shadow .3s;
    position: relative;
}

.project-card:hover {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(79, 143, 255, 0.3), 0 0 50px rgba(79, 143, 255, 0.08);
}

.project-emoji {
    font-size: 2.8rem;
    padding: 2rem 2rem 1rem;
    display: block;
    line-height: 1;
}

.project-body {
    padding: 0 1.8rem 1.8rem;
}

.project-body h3 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: .6rem;
}

.project-body p {
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.65;
}

.project-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.04) 0%, transparent 60%);
}

/* ─── CONTACT ─── */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

.contact-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    padding: .6rem .8rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all .2s;
}

.contact-link:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
}

.contact-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(79, 143, 255, 0.1);
    border: 1px solid rgba(79, 143, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.form-group label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .85rem 1rem;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
    resize: none;
}

.form-group textarea {
    min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 143, 255, 0.12);
}

.submit-btn {
    padding: .9rem 2.2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: none;
    align-self: flex-start;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 24px rgba(79, 143, 255, 0.3);
    font-family: 'DM Sans', sans-serif;
}

.submit-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 40px rgba(79, 143, 255, 0.45);
}

/* ─── FOOTER ─── */
footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

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

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

footer p {
    font-size: .82rem;
    color: var(--muted);
    margin: .25rem 0;
}

footer a {
    color: var(--muted);
    text-decoration: underline;
}

/* ─── SCROLL REVEAL ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s ease, transform .7s ease;
}

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

/* ─── HAMBURGER BUTTON ─── */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── SIDEBAR OVERLAY ─── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ─── SIDEBAR ─── */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(14, 19, 32, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.sidebar-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, border-color .2s;
    flex-shrink: 0;
}

.sidebar-close:hover {
    color: var(--text);
    border-color: var(--accent);
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-links a {
    display: block;
    padding: 0.85rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: color .2s, background .2s, border-color .2s;
}

.sidebar-links a:hover {
    color: var(--text);
    background: rgba(79, 143, 255, 0.08);
    border-color: var(--border);
}

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

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .stats-row {
        gap: 1.5rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline-item {
        padding-left: 0.75rem;
    }

    .timeline-dot {
        left: -0.45rem;
    }
}
