@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #06111f;
    --bg-soft: rgba(13, 24, 41, 0.75);
    --panel: rgba(15, 23, 42, 0.7);
    --panel-strong: rgba(30, 41, 59, 0.82);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --primary: #38bdf8;
    --primary-strong: #0ea5e9;
    --accent: #22d3ee;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --radius: 22px;
    --max-width: 1180px;
    --header-height: 84px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 35%), var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
}

.cursor-glow {
    position: fixed;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 65%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(10px);
    transition: transform 0.08s linear;
}

.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 32px), var(--max-width));
    height: var(--header-height);
    margin-top: 16px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(7, 15, 28, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 999px;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(7, 15, 28, 0.82);
    border-color: rgba(56, 189, 248, 0.18);
}

.logo {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar a {
    position: relative;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text);
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
}

main {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 120px 0;
    position: relative;
}

.home {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 32px;
    padding-top: calc(var(--header-height) + 80px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(56, 189, 248, 0.08);
    color: #bae6fd;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.home-content h1 {
    font-size: clamp(3rem, 6vw, 5.2rem);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.home-content h2 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 600;
    color: #dbeafe;
    margin-bottom: 18px;
}

.home-content h2 .pro-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-content p {
    max-width: 640px;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
    color: #02131d;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.28);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.08);
}

.home-sci {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.home-sci a {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.home-sci a:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
}

.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-ring {
    position: relative;
    width: min(340px, 72vw);
    aspect-ratio: 1 / 1;
    padding: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.7), rgba(34, 211, 238, 0.1), rgba(56, 189, 248, 0.7));
    box-shadow: 0 20px 60px rgba(56, 189, 248, 0.18);
}

.image-ring::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.image-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #091221;
}

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

.section-tag {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    font-size: 0.82rem;
    margin-bottom: 14px;
}

.section-heading h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.03em;
}

.about-card,
.contact-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 34px 30px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.about-card p,
.contact-card p {
    font-size: 1.04rem;
    line-height: 1.9;
    color: var(--muted);
}

.skills-grid,
.projects-grid {
    display: grid;
    gap: 22px;
}

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

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

.skill-card,
.project-card {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.skill-card:hover,
.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
    background: var(--panel-strong);
}

.skill-card h3,
.project-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.skill-card p,
.project-card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.98rem;
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.project-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.09);
    color: #bae6fd;
    font-size: 0.8rem;
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.project-icon {
    font-size: 1.7rem;
    color: var(--primary);
}

.project-links {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}

.project-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.project-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.project-links a:hover::after {
    transform: scaleX(1);
}

.contact-card {
    text-align: center;
}

.contact-email {
    display: inline-block;
    margin-top: 18px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
}

.footer {
    text-align: center;
    padding: 28px 16px 40px;
    color: var(--muted);
}

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

.reveal-delay {
    transition-delay: 0.12s;
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

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

@media (max-width: 980px) {
    .home {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: calc(var(--header-height) + 70px);
    }

    .home-content {
        order: 2;
    }

    .home-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .home-sci {
        justify-content: center;
    }

    .home-img {
        order: 1;
    }

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

@media (max-width: 760px) {
    .header {
        width: calc(100% - 20px);
        padding: 0 18px;
        margin-top: 10px;
        border-radius: 24px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .navbar {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        background: rgba(7, 15, 28, 0.96);
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 24px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: all 0.28s ease;
    }

    .navbar.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .navbar a::after {
        bottom: -5px;
    }

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

    .section {
        padding: 100px 0;
    }

    .home-content h1 {
        font-size: 2.75rem;
    }

    .home-content h2 {
        font-size: 1.2rem;
    }

    .about-card,
    .contact-card,
    .skill-card,
    .project-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .home-sci {
        flex-wrap: wrap;
    }
}