:root {
    --bg: #040814;
    --bg-2: #081021;
    --surface: rgba(11, 18, 38, 0.58);
    --surface-2: rgba(18, 28, 56, 0.78);
    --text: #eef4ff;
    --muted: #9aa7c7;
    --border: rgba(111, 202, 255, 0.18);
    --cyan: #68e1fd;
    --violet: #8b7cff;
    --green: #37f3c1;
    --blue: #3b82f6;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    --radius: 24px;
    --max-width: 1200px;
}

body.light-theme {
    --bg: #eef6ff;
    --bg-2: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(255, 255, 255, 0.92);
    --text: #091224;
    --muted: #50607f;
    --border: rgba(50, 120, 255, 0.12);
    --shadow: 0 18px 50px rgba(19, 39, 84, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(104, 225, 253, 0.16), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(139, 124, 255, 0.16), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(55, 243, 193, 0.10), transparent 34%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.35s ease, color 0.35s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
}

#particles {
    position: fixed;
    inset: 0;
    z-index: -4;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(280px 280px at var(--x, 50%) var(--y, 50%),
            rgba(104, 225, 253, 0.10),
            transparent 68%);
    z-index: -3;
}

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.06;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.18) 0px,
            rgba(255, 255, 255, 0.18) 1px,
            transparent 2px,
            transparent 6px);
}

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(rgba(104, 225, 253, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 225, 253, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 20%, transparent 90%);
}

.glass {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.holo-card {
    position: relative;
    overflow: hidden;
}

.holo-card::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: linear-gradient(120deg,
            transparent 20%,
            rgba(104, 225, 253, 0.10) 35%,
            rgba(139, 124, 255, 0.10) 50%,
            rgba(55, 243, 193, 0.10) 65%,
            transparent 80%);
    transform: translateX(-60%) rotate(18deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.holo-card:hover::before {
    transform: translateX(60%) rotate(18deg);
}

.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.site-header,
.section,
.site-footer {
    position: relative;
    z-index: 1;
}

.navbar {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 22px auto 0;
    padding: 14px 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 16px;
    z-index: 20;
}

.logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text);
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.24), rgba(139, 124, 255, 0.24));
    box-shadow: 0 0 24px rgba(104, 225, 253, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
    transform: translateY(-3px) rotate(-4deg);
    box-shadow: 0 0 32px rgba(104, 225, 253, 0.22);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.theme-toggle,
.menu-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-links a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(104, 225, 253, 0.08);
    box-shadow: inset 0 0 0 1px rgba(104, 225, 253, 0.14);
}

.menu-toggle {
    display: none;
    position: relative;
}

.menu-toggle span {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: var(--text);
    border-radius: 5px;
}

.menu-toggle span:nth-child(1) {
    top: 14px;
}

.menu-toggle span:nth-child(2) {
    top: 22px;
}

.menu-toggle span:nth-child(3) {
    top: 30px;
}

.hero {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0 42px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: center;
}

.hero-badge,
.section-label {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 14px;
    box-shadow: inset 0 0 20px rgba(104, 225, 253, 0.04);
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.04;
    margin: 18px 0 14px;
    letter-spacing: -1px;
}

.hero-description {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 720px;
}

.typewriter-line {
    margin: 18px 0 0;
    color: var(--cyan);
    font-weight: 600;
    min-height: 28px;
    text-shadow: 0 0 18px rgba(104, 225, 253, 0.18);
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 26px 0 18px;
}

.btn {
    padding: 14px 22px;
    border-radius: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.35s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -80%;
    width: 50%;
    height: 160%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: rotate(20deg);
    transition: left 0.7s ease;
}

.btn:hover::before {
    left: 130%;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.20), rgba(139, 124, 255, 0.20));
    box-shadow: 0 0 24px rgba(104, 225, 253, 0.10);
}

.btn-secondary,
.btn-outline {
    background: rgba(255, 255, 255, 0.04);
}

.hero-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-panel {
    padding: 18px;
    border-radius: 28px;
}

.hero-stats {
    display: grid;
    gap: 16px;
}

.hero-card {
    padding: 22px;
    border-radius: var(--radius);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-card:hover,
.skill-box:hover,
.about-card:hover,
.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 30px rgba(104, 225, 253, 0.10);
}

.hero-card h3 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.hero-card p {
    margin: 0;
    color: var(--muted);
}

.section {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 78px 0 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 12px 0 10px;
}

.section-heading p {
    color: var(--muted);
    max-width: 700px;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.16), rgba(139, 124, 255, 0.16));
    box-shadow: 0 0 22px rgba(104, 225, 253, 0.08);
}

.project-grid,
.skills-grid,
.about-grid,
.contact-grid {
    display: grid;
    gap: 20px;
}

.project-grid {
    grid-template-columns: repeat(2, 1fr);
}

.project-card,
.skill-box,
.about-card,
.contact-card {
    border-radius: var(--radius);
}

.project-card {
    overflow: hidden;
    transition: transform 0.35s ease, opacity 0.3s ease, box-shadow 0.35s ease;
    transform-style: preserve-3d;
    position: relative;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    box-shadow: 0 0 38px rgba(139, 124, 255, 0.16);
}

.project-image {
    overflow: hidden;
    height: 230px;
}

.project-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease, filter 0.65s ease;
    filter: saturate(1.05);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
    filter: saturate(1.18);
}

.project-content {
    padding: 22px;
}

.project-tag {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 0.9rem;
    font-weight: 600;
}

.project-content h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.project-content p {
    color: var(--muted);
}

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.project-links a {
    color: var(--cyan);
    font-weight: 700;
}

.skills-grid {
    grid-template-columns: repeat(4, 1fr);
}

.skill-box,
.about-card,
.contact-card {
    padding: 24px;
}

.skill-box h3,
.about-card h3,
.contact-card h3 {
    margin-top: 0;
}

.skill-box ul,
.about-card ul {
    padding-left: 18px;
    margin: 0;
    color: var(--muted);
}

.about-grid,
.contact-grid {
    grid-template-columns: repeat(2, 1fr);
}

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

label {
    color: var(--muted);
    font-size: 0.95rem;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    transition: 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: rgba(104, 225, 253, 0.45);
    box-shadow: 0 0 0 4px rgba(104, 225, 253, 0.07);
}

.site-footer {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 30px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {

    .hero,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project-grid,
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 74px;
        right: 0;
        left: 0;
        margin: 0 16px;
        padding: 14px;
        border-radius: 18px;
        flex-direction: column;
        background: rgba(6, 10, 24, 0.96);
        border: 1px solid var(--border);
        backdrop-filter: blur(14px);
    }

    body.light-theme .nav-links {
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-links.open {
        display: flex;
    }

    .project-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 50px;
    }
}