:root {
    --bg: #05070d;
    --surface: rgba(18, 23, 38, 0.65);
    --surface-strong: rgba(16, 22, 34, 0.9);
    --text: #eaf2ff;
    --muted: #9aacbf;
    --primary: #00d9ff;
    --secondary: #ff7a18;
    --border: rgba(255, 255, 255, 0.12);
    --radius-lg: 2.4rem;
    --radius-md: 1.4rem;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1300px 800px at -10% -10%, rgba(0, 217, 255, 0.15), transparent 60%),
        radial-gradient(900px 600px at 100% 0%, rgba(255, 122, 24, 0.1), transparent 55%),
        var(--bg);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: clip;
}

body.is-loading {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #10213a, #04060c 58%);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-core {
    text-align: center;
    width: min(48rem, 88vw);
}

.loader-brand {
    font-family: "Syne", sans-serif;
    font-size: clamp(4rem, 8vw, 7rem);
}

.loader-tag {
    margin: 0.8rem 0 2rem;
    color: var(--muted);
    font-size: 1.45rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.loader-track {
    width: 100%;
    height: 0.5rem;
    border-radius: 10rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
}

.loader-track span {
    width: 0;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.page-wipe {
    position: fixed;
    inset: 0;
    z-index: 319;
    background: linear-gradient(160deg, #1f1508, #04111f);
    transform: translateY(100%);
    pointer-events: none;
}

#webgl-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.08;
    background-image: radial-gradient(circle at 20% 20%, #fff 0.6px, transparent 0.6px);
    background-size: 3px 3px;
}

.cursor-glow {
    position: fixed;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.18), rgba(0, 217, 255, 0) 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(8px);
}

main {
    width: min(120rem, 92%);
    margin: 0 auto;
}

section {
    position: relative;
    padding: 11rem 0;
    transform-style: preserve-3d;
}

.snap-section {
    scroll-margin-top: 9rem;
}

.parallax-layer {
    position: absolute;
    pointer-events: none;
}

.orb {
    width: 32rem;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(2px);
}

.orb-a {
    top: 8%;
    right: -12%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.22), rgba(0, 217, 255, 0));
}

.orb-b {
    left: -10%;
    bottom: 4%;
    background: radial-gradient(circle, rgba(255, 122, 24, 0.2), rgba(255, 122, 24, 0));
}

.line-grid {
    inset: 15% 0 auto;
    height: 44rem;
    background:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 5rem 5rem;
    mask-image: radial-gradient(circle at center, #000 30%, transparent 78%);
    opacity: 0.35;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.heading,
.home h1 {
    font-family: "Syne", sans-serif;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.heading {
    font-size: clamp(3.2rem, 5vw, 5.5rem);
}

.section-header {
    margin-bottom: 4rem;
}

.header {
    position: fixed;
    top: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(120rem, 94%);
    padding: 1.4rem 2rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 120;
}

.logo {
    font-family: "Syne", sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
}

.logo span {
    color: var(--secondary);
}

.navbar {
    display: flex;
    gap: 1.8rem;
}

.navbar a {
    font-size: 1.36rem;
    color: var(--muted);
    transition: color 0.3s ease;
}

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

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

.hero-grid {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 4rem;
}

.home-content h1 {
    margin-top: 1.2rem;
    font-size: clamp(4rem, 7vw, 8.2rem);
    text-wrap: balance;
}

.home-content h1 span {
    background: linear-gradient(90deg, var(--primary), #9ee8ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-text {
    margin-top: 1.8rem;
    font-size: clamp(2rem, 2.4vw, 3rem);
    color: var(--text);
}

#dynamic-role {
    color: var(--secondary);
}

.home-content p {
    margin-top: 2rem;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.8rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 3.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1.2rem 2.2rem;
    border-radius: 5rem;
    border: 1px solid transparent;
    color: #001018;
    background: linear-gradient(90deg, var(--primary), #71ebff);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 217, 255, 0.28);
}

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

.btn.small {
    font-size: 1.35rem;
    padding: 1rem 1.6rem;
}

.social-icons {
    margin-top: 2.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icons a {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.social-icons a img {
    width: 1.7rem;
    height: 1.7rem;
}

.social-icons a:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.hero-card,
.service-box,
.project-card,
.timeline-card,
.contact-form,
.skills-cloud,
.skill-bars,
.freelance-step,
.client-card,
.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}

.hero-card {
    padding: 2.4rem;
}

.home-img {
    border-radius: calc(var(--radius-lg) - 0.4rem);
    overflow: hidden;
}

.home-img img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.stat-grid {
    margin-top: 1.6rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.stat-grid div {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 1.2rem;
}

.stat-grid h3 {
    font-family: "Syne", sans-serif;
    font-size: 2.2rem;
    color: var(--secondary);
}

.stat-grid p {
    font-size: 1.25rem;
    color: var(--muted);
}

.services-container,
.projects-box,
.freelance-grid,
.clients-grid,
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.service-box,
.freelance-step,
.client-card,
.testimonial-card {
    padding: 2.4rem;
}

.service-box i {
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 2rem;
    margin-bottom: 1.4rem;
    color: #031018;
    background: linear-gradient(90deg, var(--secondary), #ffb067);
}

.service-box h3,
.freelance-step h3,
.client-card h3,
.testimonial-card h4 {
    font-size: 2.1rem;
    font-family: "Syne", sans-serif;
    margin-bottom: 0.8rem;
}

.service-box p,
.freelance-step p,
.client-card p,
.testimonial-card p,
.project-card p,
.timeline-card p,
.contact-form input,
.contact-form textarea {
    font-size: 1.6rem;
    color: var(--muted);
}

.freelance-step span {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--secondary);
}

.client-card ul {
    margin-top: 1.2rem;
    list-style: none;
}

.client-card li {
    font-size: 1.45rem;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.testimonial-card h4 {
    font-size: 1.8rem;
    margin-top: 1.2rem;
    margin-bottom: 0;
}

.skills-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

.skills-cloud {
    padding: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.chip {
    border-radius: 100px;
    border: 1px solid var(--border);
    padding: 0.8rem 1.2rem;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.04);
}

.skill-bars {
    padding: 2.2rem;
}

.progress-item + .progress-item {
    margin-top: 1.6rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    color: var(--text);
    font-size: 1.45rem;
    margin-bottom: 0.6rem;
}

.progress-track {
    height: 1rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.project-card {
    position: relative;
    padding: 1.5rem;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.24s ease, border-color 0.24s ease;
    overflow: hidden;
}

.project-card:hover {
    border-color: rgba(0, 217, 255, 0.44);
}

.project-media {
    position: relative;
    border-radius: 1.2rem;
    overflow: hidden;
}

.project-media img,
.project-preview {
    width: 100%;
    height: 21rem;
    object-fit: cover;
}

.project-preview {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.project-card.previewing .project-preview {
    opacity: 1;
}

.project-spotlight {
    position: absolute;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.24), rgba(0, 217, 255, 0));
    left: var(--spot-x, 50%);
    top: var(--spot-y, 50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .project-spotlight {
    opacity: 1;
}

.project-card h3 {
    margin-top: 1.2rem;
    font-size: 2rem;
    font-family: "Syne", sans-serif;
}

.project-card p {
    margin: 0.8rem 0 1.6rem;
}

.timeline {
    display: grid;
    gap: 1.4rem;
}

.timeline-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.timeline-card::after {
    content: "";
    position: absolute;
    right: -20%;
    top: -20%;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.2), transparent 65%);
}

.timeline-card span {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.timeline-card h3 {
    margin: 0.7rem 0 0.5rem;
    font-size: 2.2rem;
    font-family: "Syne", sans-serif;
}

.contact-form {
    padding: 2.2rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
    padding: 1.2rem 1.4rem;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: "Manrope", sans-serif;
}

.contact-form textarea {
    margin-top: 1rem;
    resize: vertical;
    min-height: 16rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

.contact-form .btn {
    margin-top: 1.4rem;
}

.footer {
    width: min(120rem, 92%);
    margin: 4rem auto 2.4rem;
    padding: 2.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    font-size: 1.45rem;
    color: var(--muted);
    margin-top: 1rem;
}

.success-modal {
    position: fixed;
    inset: 0;
    z-index: 230;
    background: rgba(2, 6, 14, 0.7);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.success-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: min(46rem, 90vw);
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2.6rem;
    text-align: center;
    position: relative;
    transform: translateY(30px) scale(0.94);
    transition: transform 0.3s ease;
}

.success-modal.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    right: 1.4rem;
    top: 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
}

.success-icon {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    margin: 0 auto 1.4rem;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #2ff5be, #00b48a);
    color: #012419;
    font-size: 3rem;
}

.modal-card h3 {
    font-family: "Syne", sans-serif;
    font-size: 3rem;
}

.modal-card p {
    margin: 0.9rem 0 1.8rem;
    font-size: 1.6rem;
    color: var(--muted);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (max-width: 1200px) {
    .navbar {
        gap: 1.4rem;
    }

    .navbar a {
        font-size: 1.24rem;
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 59%;
    }

    .hero-grid,
    .skills-layout,
    .services-container,
    .projects-box,
    .freelance-grid,
    .clients-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid {
        padding-top: 8rem;
    }
}

@media (max-width: 760px) {
    html {
        font-size: 56%;
    }

    .cursor-glow,
    .orb {
        display: none;
    }

    .menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 6.4rem;
        right: 1.4rem;
        width: 24rem;
        flex-direction: column;
        gap: 1rem;
        padding: 1.4rem;
        border-radius: 1.6rem;
        border: 1px solid var(--border);
        background: rgba(7, 10, 20, 0.95);
        display: none;
    }

    .navbar.active {
        display: flex;
    }

    .hero-grid,
    .skills-layout,
    .services-container,
    .projects-box,
    .input-grid,
    .freelance-grid,
    .clients-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 9rem 0;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
