/* =========================================================
   MIDE CONCEPTS — MAIN STYLES
========================================================= */

:root {
    --bg: #0b0b0d;
    --bg-soft: #111113;
    --card: #1b1b1e;
    --card-light: #202023;
    --white: #f7f7f8;
    --muted: #9a9a9f;
    --purple: #8141e8;
    --purple-light: #a65cff;
    --border: rgba(255,255,255,.09);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

section {
    position: relative;
}

.section {
    padding: 120px 7%;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    height: 88px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(13,13,15,.94);
    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 1000;

    backdrop-filter: blur(15px);
}

.brand {
    position: relative;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 1px;
    min-width: 180px;
}
.brand img {
    width: 110px;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand span {
    color: var(--purple-light);
}

.brand small {
    display: block;
    font-size: 8px;
    letter-spacing: 4px;
    color: #aaa;
    margin-left: 26px;
    margin-top: -4px;
}

.nav {
    display: flex;
    gap: 34px;
    align-items: center;
}

.nav a {
    color: #aaa;
    font-size: 14px;
    transition: .3s ease;
}

.nav a:hover {
    color: var(--purple-light);
}

.talk {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-left: auto;
    margin-right: 25px;
}

.talk:hover {
    color: var(--purple-light);
}

.menu-btn {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: var(--purple);
    color: white;
    font-size: 23px;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: calc(100vh - 88px);
    display: grid;
    grid-template-columns: 1.05fr 1.15fr .55fr;
    align-items: center;
    gap: 30px;
    padding: 50px 7% 70px;

    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        #101012;

    background-size: 160px 160px;
}

.hero-content {
    position: relative;
    z-index: 5;
}

.small-title,
.section-label {
    color: var(--purple-light);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(45px, 5vw, 76px);
    line-height: .98;
    font-weight: 800;
    letter-spacing: -3px;
}

.hero h1 span {
    color: var(--purple-light);
}

.hero h2 {
    margin-top: 20px;
    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.05;
    font-weight: 500;
}

.hero-description {
    max-width: 590px;
    margin-top: 30px;
    color: #aaaab0;
    line-height: 1.9;
    font-size: 15px;
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 27px;
}

.socials a {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: white;
    color: #111;
    font-size: 17px;
    font-weight: 900;
    transition: .3s;
}

.socials a > i,
.socials a > svg {
    font-size: 17px;
}

.socials a:hover {
    background: var(--purple);
    color: white;
    transform: translateY(-4px);
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 30px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 12px;
    background: var(--purple);
    color: white;
    font-weight: 700;
    transition: .3s;
}

.btn-primary:hover {
    background: var(--purple-light);
    transform: translateY(-3px);
}

.resume-btn {
    font-weight: 600;
    font-size: 14px;
}

.resume-btn span {
    color: var(--purple-light);
    font-size: 22px;
    margin-left: 5px;
}


/* =========================================================
   HERO PHOTO
========================================================= */

.hero-person {
    position: relative;
    height: 680px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: visible;
}

.hero-person img {
    position: relative;
    z-index: 3;

    width: 520px;
    height: 650px;

    object-fit: cover;
    object-position: center top;

    border-radius: 50% 50% 48% 48%;

    filter: drop-shadow(0 25px 45px rgba(0,0,0,.7));

    animation: personFloat 5s ease-in-out infinite;
}

@keyframes personFloat {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.purple-shape {
    position: absolute;
    width: 430px;
    height: 530px;
    border-radius: 50% 50% 45% 45%;
    background: var(--purple);
    opacity: .72;
    right: 12%;
    bottom: 5%;
    transform: rotate(18deg);
    z-index: 1;
}

.purple-shape.second {
    width: 350px;
    height: 430px;
    background: #050505;
    opacity: 1;
    right: 25%;
    bottom: 17%;
    z-index: 2;
}


/* =========================================================
   STATS
========================================================= */

.stats {
    background: #080809;
    border-radius: 18px;
    padding: 35px 30px;
    z-index: 5;
}

.stat {
    padding: 5px 0 30px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,.13);
}

.stat:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stat strong {
    display: block;
    color: var(--purple-light);
    font-size: 38px;
    margin-bottom: 12px;
}

.stat span {
    color: #aaa;
    font-size: 14px;
}


/* =========================================================
   ABOUT
========================================================= */

.about {
    min-height: 720px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 80px;

    background: #050506;
}

.about-text {
    max-width: 760px;
}

.about h2,
.section-heading h2,
.resume h2,
.skills h2,
.contact h2 {
    font-size: clamp(42px, 5vw, 65px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.about h2 span,
.section-heading h2 span,
.resume h2 span,
.skills h2 span,
.contact h2 span {
    color: var(--purple-light);
}

.about-text > p:not(.section-label) {
    color: #aaa;
    line-height: 1.9;
    margin-top: 28px;
}

.about ul {
    list-style: none;
    margin-top: 30px;
}

.about li {
    margin: 18px 0;
    color: #ddd;
    line-height: 1.5;
}

.about li::before {
    content: "✓";
    color: var(--purple-light);
    font-weight: 800;
    margin-right: 15px;
}

.about-image {
    min-height: 570px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 25px;
}

.about-image img {
    width: 100%;
    height: 570px;
    object-fit: cover;
    border-radius: 25px;
    position: relative;
    z-index: 2;
}

.about-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: var(--purple);
    filter: blur(130px);
    opacity: .35;
}


/* =========================================================
   SERVICES
========================================================= */

.services {
    background: #0d0d0f;
}

.section-heading {
    margin-bottom: 55px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}

.service-card {
    padding: 38px;
    min-height: 245px;
    border: 1px solid var(--border);
    background: #151518;
    border-radius: 16px;
    transition: .35s;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(129,65,232,.6);
}

.service-card > span {
    color: var(--purple-light);
    font-size: 14px;
    font-weight: 700;
}

.service-card h3 {
    margin-top: 35px;
    font-size: 23px;
}

.service-card p {
    color: #999;
    margin-top: 15px;
    line-height: 1.7;
}


/* =========================================================
   RESUME
========================================================= */

.resume {
    min-height: 700px;
    display: grid;
    grid-template-columns: .7fr 1.5fr;
    gap: 55px;

    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        #101012;

    background-size: 160px 160px;
}

.resume-side {
    position: relative;
}

.resume-symbol {
    margin-top: 60px;
    width: 270px;
    height: 270px;
    border: 1px solid #333;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 100px;
    color: var(--purple);
    background: #202022;
}

.experience {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #202022;
    border-radius: 18px;
    overflow: hidden;
}

.experience-column {
    padding: 55px 40px;
}

.experience-column + .experience-column {
    border-left: 1px solid #373739;
}

.experience-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 18px;
    margin-bottom: 65px;
}

.experience-item > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #09090a;
    color: var(--purple-light);
}

.experience-item small {
    color: #b5b5ba;
    font-size: 13px;
}

.experience-item h3 {
    margin-top: 22px;
    font-size: 22px;
    line-height: 1.35;
}

.experience-item p {
    margin-top: 15px;
    color: #77777c;
    line-height: 1.4;
}


/* =========================================================
   SKILLS
========================================================= */

.skills {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 70px;
    background: #08080a;
}

.skills-intro > p:not(.section-label) {
    color: #aaa;
    line-height: 1.9;
    margin-top: 35px;
    max-width: 500px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.skill-card {
    min-height: 280px;
    padding: 30px 12px 12px;
    border-radius: 15px;
    border: 1px solid #363638;
    background: #202022;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: .3s;
}

.skill-card:hover {
    transform: translateY(-7px);
    border-color: var(--purple);
}

.tool-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 40px;
    margin-bottom: 35px;
}

.wordpress {
    color: #0087b5;
    border: 5px solid #0087b5;
    border-radius: 50%;
}

.elementor {
    background: #c90054;
}

.photoshop {
    background: #061b38;
    color: #2998ff;
}

.illustrator {
    background: #330000;
    color: #ffae00;
}

.premiere {
    background: #16005c;
    color: #aaa0ff;
}

.aftereffects {
    background: #09006b;
    color: #aaa0ff;
}

.xd {
    background: #3b0030;
    color: #ff4de2;
}

.figma {
    background: #151515;
    color: #ff6c5c;
}

.skill-card h3 {
    font-size: 16px;
    margin-bottom: auto;
}

.skill-card strong {
    width: 90%;
    text-align: center;
    background: #111113;
    padding: 12px;
    border-radius: 13px;
    color: #888;
    font-size: 19px;
}


/* =========================================================
   PORTFOLIO
========================================================= */

.portfolio {
    min-height: 850px;
    background: #050506;
    overflow: hidden;
}

.center {
    text-align: center;
}

.portfolio-scene {
    width: 300px;
    height: 300px;
    margin: 130px auto 0;
    perspective: 1100px;
}

.portfolio-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;

    animation: cubeRotate 18s linear infinite;
}

@keyframes cubeRotate {
    from {
        transform: rotateX(-8deg) rotateY(0deg);
    }

    to {
        transform: rotateX(-8deg) rotateY(360deg);
    }
}

.portfolio-face {
    position: absolute;
    width: 300px;
    height: 300px;

    background: linear-gradient(145deg,#252527,#111113);
    border: 1px solid rgba(255,255,255,.15);

    display: grid;
    place-items: center;

    backface-visibility: hidden;
}

.front {
    transform: translateZ(150px);
}

.back {
    transform: rotateY(180deg) translateZ(150px);
}

.right {
    transform: rotateY(90deg) translateZ(150px);
}

.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.top {
    transform: rotateX(90deg) translateZ(150px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

.project-placeholder {
    font-size: 45px;
    font-weight: 800;
    color: var(--purple-light);
}


/* =========================================================
   CONTACT
========================================================= */

.contact {
    text-align: center;
    padding-top: 150px;
    padding-bottom: 150px;
    background: #101012;
}

.contact > p:not(.section-label) {
    color: #999;
    margin-top: 25px;
    font-size: 17px;
}

.contact-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-outline {
    border: 1px solid #444;
    padding: 15px 27px;
    border-radius: 12px;
    font-weight: 600;
    transition: .3s;
}

.btn-outline:hover {
    border-color: var(--purple);
    color: var(--purple-light);
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 50px 7%;
    border-top: 1px solid var(--border);
    background: #08080a;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

footer p {
    color: #777;
    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1150px) {

    .nav {
        gap: 18px;
    }

    .hero {
        grid-template-columns: 1fr 1fr;
    }

    .stats {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3,1fr);
        gap: 20px;
    }

    .stat {
        margin: 0;
        border-bottom: 0;
        border-right: 1px solid #333;
        padding: 10px 25px;
    }

    .stat:last-child {
        border-right: 0;
    }

    .skills {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 850px) {

    .header {
        padding: 0 5%;
    }

    .nav {
        display: none;
    }

    .talk {
        margin-left: auto;
    }

    .menu-btn {
        display: grid;
        place-items: center;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-person {
        order: 2;
        height: 550px;
    }

    .stats {
        order: 3;
    }

    .socials,
    .hero-buttons {
        justify-content: center;
    }

    .about,
    .resume {
        grid-template-columns: 1fr;
    }

    .experience {
        grid-template-columns: 1fr;
    }

    .experience-column + .experience-column {
        border-left: 0;
        border-top: 1px solid #373739;
    }

    .service-grid {
        grid-template-columns: 1fr 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2,1fr);
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}


@media (max-width: 550px) {

    .section {
        padding: 85px 5%;
    }

    .hero {
        padding: 60px 5%;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero-person {
        height: 470px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stat {
        border-right: 0;
        border-bottom: 1px solid #333;
        padding: 20px;
    }

    .stat:last-child {
        border-bottom: 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .skill-card {
        min-height: 240px;
    }

    .tool-icon {
        width: 75px;
        height: 75px;
        font-size: 30px;
    }

    /* ================= PORTFOLIO GRID ================= */

.portfolio-scene {
    width: 100%;
    height: auto;
    perspective: none;
    display: block;
}

.portfolio-grid {
    width: 100%;
    margin-top: 50px;
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
}

.portfolio-item {
    position: absolute;
    width: 330px;
    height: 420px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    overflow: hidden;
    border-radius: 20px;

    background: #111;
    cursor: pointer;

    transition:
        transform 0.7s ease,
        opacity 0.7s ease,
        filter 0.7s ease;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transition: transform 0.5s ease;
}

/* CENTER */
.portfolio-item:nth-child(1) {
    transform: translate(-50%, -50%) translateX(0) rotateY(0deg) scale(1);
    opacity: 1;
    filter: brightness(1);
    z-index: 10;
}

/* LEFT */
.portfolio-item:nth-child(2) {
    transform: translate(-50%, -50%) translateX(-220px) rotateY(25deg) scale(0.88);
    opacity: 0.85;
    filter: brightness(0.8);
    z-index: 5;
}

/* FAR LEFT */
.portfolio-item:nth-child(3) {
    transform: translate(-50%, -50%) translateX(-430px) rotateY(40deg) scale(0.76);
    opacity: 0.6;
    filter: brightness(0.65);
    z-index: 2;
}

/* RIGHT */
.portfolio-item:nth-child(4) {
    transform: translate(-50%, -50%) translateX(220px) rotateY(-25deg) scale(0.88);
    opacity: 0.85;
    filter: brightness(0.8);
    z-index: 5;
}

/* FAR RIGHT */
.portfolio-item:nth-child(5) {
    transform: translate(-50%, -50%) translateX(430px) rotateY(-40deg) scale(0.76);
    opacity: 0.6;
    filter: brightness(0.65);
    z-index: 2;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}


/* ================= TABLET ================= */

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}


/* ================= MOBILE ================= */

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .portfolio-overlay h3 {
        font-size: 19px;
    }
}
}
/* =========================================================
   ABOUT CONTACT CARD
========================================================= */

.about-contact {
    position: relative;
    z-index: 5;

    width: 100%;
    margin-top: 18px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    padding: 18px;

    background: #202022;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.about-contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: var(--purple);
    color: white;

    font-size: 20px;
    font-weight: 900;
}

.about-contact-icon i,
.about-contact-icon svg {
    font-size: 18px;
}

.contact-item small {
    display: block;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 5px;
}

.contact-item strong {
    display: block;
    color: white;
    font-size: 13px;
    word-break: break-word;
}

.contact-item:hover strong {
    color: var(--purple-light);
}


/* Mobile */

@media (max-width: 650px) {

    .about-contact {
        grid-template-columns: 1fr;
    }

}
/* =========================================================
   PORTFOLIO - NEW CAROUSEL
   ========================================================= */

.portfolio-grid {
    width: 100%;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 5px 30px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.portfolio-grid::-webkit-scrollbar {
    display: none;
}

.portfolio-item {
    position: relative !important;
    flex: 0 0 320px !important;
    width: 320px !important;
    height: 380px !important;
    min-width: 320px !important;
    aspect-ratio: auto !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.portfolio-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 25px 22px 22px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9),
        rgba(0, 0, 0, 0.45),
        transparent
    );
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.35s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay span {
    display: block;
    font-size: 13px;
    color: #a855f7;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-overlay h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

/* TABLET */
@media (max-width: 900px) {
    .portfolio-item {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 340px !important;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .portfolio-grid {
        gap: 16px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .portfolio-item {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 340px !important;
    }

    .portfolio-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .portfolio-overlay h3 {
        font-size: 19px;
    }
}
/* =========================================================
   MIDE CONCEPTS — CONTINUOUS INFINITE PORTFOLIO
   ========================================================= */

.portfolio-grid {
    width: 100% !important;

    display: flex !important;

    flex-wrap: nowrap !important;

    gap: 24px !important;

    overflow-x: hidden !important;
    overflow-y: visible !important;

    padding: 30px 5px !important;

    scroll-behavior: auto !important;

    scrollbar-width: none !important;

    perspective: 1200px;
}

.portfolio-grid::-webkit-scrollbar {
    display: none;
}


/* ---------------------------------------------------------
   PORTFOLIO CARD
   --------------------------------------------------------- */

.portfolio-grid .portfolio-item {
    position: relative !important;

    flex: 0 0 320px !important;

    width: 320px !important;

    height: 380px !important;

    min-width: 320px !important;

    min-height: 380px !important;

    max-width: 320px !important;
    max-height: 380px !important;

    left: auto !important;
    top: auto !important;

    margin: 0 !important;

    overflow: hidden !important;

    border-radius: 20px !important;

    background: #111 !important;

    opacity: 1;

    filter: none !important;

    transform-style: preserve-3d;

    transition:
        transform 0.25s ease-out,
        opacity 0.25s ease-out,
        box-shadow 0.25s ease-out !important;

    will-change: transform, opacity;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45);
}


/* ---------------------------------------------------------
   REMOVE OLD 3D POSITIONING
   --------------------------------------------------------- */

.portfolio-grid .portfolio-item:nth-child(1),
.portfolio-grid .portfolio-item:nth-child(2),
.portfolio-grid .portfolio-item:nth-child(3),
.portfolio-grid .portfolio-item:nth-child(4),
.portfolio-grid .portfolio-item:nth-child(5),
.portfolio-grid .portfolio-item:nth-child(6),
.portfolio-grid .portfolio-item:nth-child(7),
.portfolio-grid .portfolio-item:nth-child(8),
.portfolio-grid .portfolio-item:nth-child(9),
.portfolio-grid .portfolio-item:nth-child(10),
.portfolio-grid .portfolio-item:nth-child(11),
.portfolio-grid .portfolio-item:nth-child(12) {
    left: auto !important;
    top: auto !important;

    filter: none !important;
}


/* ---------------------------------------------------------
   IMAGES
   --------------------------------------------------------- */

.portfolio-grid .portfolio-item img {
    width: 100% !important;

    height: 100% !important;

    object-fit: cover !important;

    display: block !important;

    transform: none;

    transition:
        transform 0.5s ease;
}


/* ---------------------------------------------------------
   IMAGE HOVER
   --------------------------------------------------------- */

.portfolio-grid .portfolio-item:hover img {
    transform: scale(1.05);
}


/* ---------------------------------------------------------
   OVERLAY
   --------------------------------------------------------- */

.portfolio-grid .portfolio-overlay {
    position: absolute !important;

    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    padding: 25px 22px 22px !important;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.90),
            rgba(0, 0, 0, 0.45),
            transparent
        ) !important;

    transform: translateY(10px);

    opacity: 0;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}


.portfolio-grid .portfolio-item:hover .portfolio-overlay {
    opacity: 1;

    transform: translateY(0);
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .portfolio-grid {
        gap: 18px !important;

        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .portfolio-grid .portfolio-item {
        flex-basis: 280px !important;

        width: 280px !important;

        min-width: 280px !important;

        max-width: 280px !important;

        height: 340px !important;

        min-height: 340px !important;

        max-height: 340px !important;
    }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .portfolio-grid {
        gap: 16px !important;

        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .portfolio-grid .portfolio-item {
        flex-basis: 280px !important;

        width: 280px !important;

        min-width: 280px !important;

        max-width: 280px !important;

        height: 340px !important;

        min-height: 340px !important;

        max-height: 340px !important;
    }
}
/* =========================================================
   PORTFOLIO — SMOOTH 3D FLIP EFFECT
   ========================================================= */

.portfolio-grid {
    perspective: 1400px !important;
}

.portfolio-grid .portfolio-item {
    transform-style: preserve-3d !important;

    backface-visibility: hidden;

    will-change: transform, opacity;

    transition:
        transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity 0.45s ease !important;
}

.portfolio-grid .portfolio-item img {
    backface-visibility: hidden;
    transform-origin: center center;
}
/* STRONG 3D FLIP */

.portfolio-grid {
    perspective: 1600px !important;
    perspective-origin: center center !important;
}

.portfolio-grid .portfolio-item {
    transform-style: preserve-3d !important;
    backface-visibility: hidden !important;

    will-change: transform, opacity;

    transition:
        transform 0.25s linear,
        opacity 0.25s linear !important;
}

.portfolio-grid .portfolio-item img {
    backface-visibility: hidden !important;
}
.experience-item small,
.experience-item p {
    font-weight: 800 !important;
}
/* =========================================================
   CENTER EXPERIENCE CONTENT
   ========================================================= */

.experience-item {
    position: relative;
}

.experience-item > div {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;
}

.experience-item > div h3,
.experience-item > div p,
.experience-item > div small {
    text-align: center;
}
/* =========================================================
   CONTACT SECTION
========================================================= */

.contact {
    width: 100%;
    padding: 100px 5%;
    background: #111;
}

.contact-container {
    max-width: 1250px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;

    align-items: center;
}


/* LEFT SIDE */

.contact-label {
    color: #aaa;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
}

.contact-info h2 {
    margin: 0;
    color: #fff;
    font-size: 46px;
    line-height: 1.15;
    font-weight: 700;
}

.contact-info h2 span {
    display: block;
    color: #8b45e8;
}

.contact-description {
    max-width: 470px;
    margin-top: 35px;

    color: #aaa;
    font-size: 17px;
    line-height: 1.8;
}


/* STATS */

.contact-stats {
    margin-top: 45px;

    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-stat {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-stat span {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #7340b8;
    color: #111;

    font-weight: 800;
}

.contact-stat p {
    margin: 0;
    color: #aaa;
    font-size: 17px;
}


/* FORM */

.contact-form {
    width: 100%;
}

.contact-form form {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;

    border: none;
    outline: none;

    background: #303030;
    color: #fff;

    border-radius: 20px;

    padding: 20px 15px;

    font-family: inherit;
    font-size: 15px;
}

.contact-form input {
    height: 60px;
}

.contact-form textarea {
    height: 125px;
    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaa;
}

.contact-form button {
    width: 100%;
    height: 55px;

    border: none;
    border-radius: 20px;

    background: #7440b8;
    color: #fff;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

.contact-form button:hover {
    background: #8b45e8;
    transform: translateY(-2px);
}
/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    position: relative;
    width: 100%;
    display: block;
    padding: 0;
    background: #080808;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0;
    overflow: hidden;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 40px 65px;

    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 80px;
    align-items: start;
}


/* BRAND */

.footer-logo {
    position: relative;
    display: inline-flex;
    flex-direction: column;

    color: #ffffff;
    text-decoration: none;

    font-size: 42px;
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -2px;
}

.footer-logo span {
    color: #9147ff;
}

.footer-logo small {
    margin-top: 8px;
    margin-left: 25px;

    font-size: 9px;
    font-weight: 600;
    letter-spacing: 4px;
    color: #ffffff;
}


/* SOCIAL ICONS */

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.footer-socials a {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ffffff;
    color: #111111;

    text-decoration: none;
    font-size: 17px;
    font-weight: 900;

    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background: #9147ff;
    color: #ffffff;
    transform: translateY(-4px);
}


/* QUICK LINKS */

.footer-links h3,
.footer-contact h3 {
    margin: 0 0 35px;

    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.quick-links {
    display: flex;
    gap: 42px;
    margin-bottom: 40px;
}

.quick-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 15px;

    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: #9147ff;
}


/* EMAIL SUBSCRIBE */

.footer-subscribe {
    display: flex;
    width: 100%;
    max-width: 500px;

    background: #252525;
    border-radius: 18px;
    overflow: hidden;
}

.footer-subscribe input {
    flex: 1;

    min-width: 0;
    height: 58px;

    border: none;
    outline: none;

    padding: 0 18px;

    background: transparent;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
}

.footer-subscribe input::placeholder {
    color: #999;
}

.footer-subscribe button {
    width: 120px;

    border: none;
    outline: none;

    background: #9147ff;
    color: #ffffff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.3s ease;
}

.footer-subscribe button:hover {
    background: #a45cff;
}


/* CONTACT */

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-bottom: 22px;

    color: #aaa;
    text-decoration: none;

    font-size: 15px;

    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #ffffff;
}

.footer-contact-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: rgba(145, 71, 255, 0.2);
    color: #b77bff;
    font-size: 21px;
    font-weight: 900;
}

.footer-socials a > i,
.footer-socials a > svg {
    font-size: 17px;
}

.footer-contact-icon i,
.footer-contact-icon svg {
    font-size: 20px;
}


/* COPYRIGHT */

.footer-bottom {
    min-height: 85px;

    display: flex;
    align-items: center;

    padding: 0 40px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);

    background: #101010;
}

.footer-bottom p {
    margin: 0;

    color: #aaa;
    font-size: 14px;
}

.footer-bottom strong {
    color: #ffffff;
}


/* =========================================================
   FLOATING WHATSAPP
========================================================= */

.whatsapp-float {
    position: fixed;

    left: 18px;
    bottom: 18px;

    width: 74px;
    height: 74px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #25D366;
    color: #ffffff;

    text-decoration: none;

    z-index: 9999;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.whatsapp-float span {
    font-size: 42px;
    line-height: 1;
}

.whatsapp-float i {
    font-size: 42px;
    line-height: 1;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.35);
}


/* =========================================================
   FOOTER MOBILE
========================================================= */

@media (max-width: 900px) {

    .footer-main {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 60px 25px;
    }

    .footer-links h3,
    .footer-contact h3 {
        margin-bottom: 25px;
    }

    .quick-links {
        gap: 25px;
    }

    .footer-subscribe {
        max-width: 100%;
    }

    .footer-bottom {
        padding: 25px;
    }

}


@media (max-width: 600px) {

    .footer-logo {
        font-size: 36px;
    }

    .quick-links {
        flex-wrap: wrap;
    }

    .footer-subscribe {
        height: 54px;
    }

    .footer-subscribe input {
        height: 54px;
    }

    .footer-subscribe button {
        width: 95px;
    }

    .whatsapp-float {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25D366;
    color: white;
    text-decoration: none;
    z-index: 9999;
}

.whatsapp-float i {
    font-size: 42px;
}

}
.footer-logo img {
    width: 150px;
    height: auto;
    display: block;
}
/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #111;
    z-index: 99999;

    transform: translateX(100%);
    transition: transform 0.4s ease;

    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 15px;
    left: 18px;

    width: 45px;
    height: 45px;

    border: none;
    background: #050505;
    color: #8b45ff;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;
    z-index: 10;
}

.mobile-menu-content {
    padding: 70px 55px 40px;
}

.mobile-menu-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 50px;
}

.mobile-menu-content h2 {
    color: #fff;
    font-size: 24px;
    line-height: 1.4;
    margin: 0 0 60px;
    font-weight: 600;
}

.mobile-contact h3,
.mobile-socials h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 25px;
}

.mobile-contact a {
    display: flex;
    align-items: center;
    gap: 20px;

    color: #aaa;
    text-decoration: none;

    font-size: 17px;
    margin-bottom: 28px;
}

.mobile-contact a i {
    color: #8b45ff;
    width: 18px;
    font-size: 19px;
    font-weight: 900;
}

.mobile-socials {
    margin-top: 45px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;

    border-radius: 50%;
    background: #fff;
    color: #111;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    transition: 0.3s ease;
}

.social-icons a:hover {
    background: #8b45ff;
    color: #fff;
}

.social-icons a > i,
.social-icons a > svg {
    font-size: 18px;
}


/* MOBILE ONLY */
@media (min-width: 901px) {
    .mobile-menu {
    }
}

/* =========================================================
   MOBILE LAYOUT REFINEMENTS
   Keeps the desktop design intact while improving phone spacing,
   readability, and touch targets.
========================================================= */

@media (max-width: 850px) {
    .header {
        height: 76px;
        padding: 0 18px;
    }

    .brand {
        min-width: 0;
    }

    .brand img {
        width: 96px;
    }

    .talk {
        margin-right: 12px;
        font-size: 11px;
        letter-spacing: 1.4px;
        white-space: nowrap;
    }

    .menu-btn {
        width: 44px;
        height: 44px;
        font-size: 21px;
    }

    .hero {
        gap: 14px;
        padding: 50px 6% 55px;
    }

    .hero-person {
        width: 100%;
        max-width: 420px;
        height: 440px;
        margin: 0 auto;
    }

    .hero-person img {
        width: min(100%, 340px);
        height: 430px;
    }

    .purple-shape {
        width: 300px;
        height: 380px;
        right: calc(50% - 150px);
        bottom: 14px;
    }

    .purple-shape.second {
        width: 248px;
        height: 320px;
        right: calc(50% - 118px);
        bottom: 60px;
    }

    .section {
        padding: 84px 6%;
    }

    .about-image {
        min-height: 390px;
    }

    .about-image img {
        height: 390px;
    }

    .resume {
        gap: 42px;
    }

    .resume-symbol {
        width: 150px;
        height: 150px;
        margin: 35px auto 0;
        font-size: 64px;
    }

    .experience-item {
        margin-bottom: 42px;
    }

    .service-card {
        min-height: 0;
        padding: 28px;
    }

    .skills {
        gap: 38px;
    }

    .contact {
        padding: 80px 6%;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .contact-info h2 {
        font-size: clamp(34px, 8vw, 44px);
    }

    .contact-description {
        font-size: 16px;
        line-height: 1.7;
    }

    .footer-main {
        gap: 38px;
    }
}

@media (max-width: 600px) {
    .header {
        height: 72px;
        padding: 0 14px;
    }

    .brand img {
        width: 88px;
    }

    .talk {
        margin-right: 8px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .hero {
        padding: 44px 5% 48px;
    }

    .hero h1 {
        font-size: clamp(40px, 12vw, 48px);
        letter-spacing: -2px;
    }

    .hero h2 {
        margin-top: 16px;
        font-size: 26px;
    }

    .hero-description {
        margin-top: 22px;
        font-size: 14px;
        line-height: 1.75;
    }

    .socials {
        margin-top: 22px;
    }

    .hero-buttons {
        flex-wrap: wrap;
        gap: 18px;
        margin-top: 24px;
    }

    .btn-primary {
        padding: 14px 22px;
    }

    .hero-person {
        height: 400px;
    }

    .hero-person img {
        width: min(100%, 310px);
        height: 390px;
    }

    .purple-shape {
        width: 275px;
        height: 340px;
        right: calc(50% - 138px);
    }

    .purple-shape.second {
        width: 225px;
        height: 290px;
        right: calc(50% - 108px);
        bottom: 56px;
    }

    .section {
        padding: 70px 5%;
    }

    .small-title,
    .section-label {
        font-size: 11px;
        letter-spacing: 2.8px;
    }

    .about h2,
    .section-heading h2,
    .resume h2,
    .skills h2,
    .contact h2 {
        font-size: clamp(34px, 10vw, 42px);
        letter-spacing: -1.5px;
    }

    .about-text > p:not(.section-label),
    .skills-intro > p:not(.section-label) {
        font-size: 14px;
        line-height: 1.75;
    }

    .about li {
        font-size: 14px;
    }

    .about-image,
    .about-image img {
        min-height: 330px;
        height: 330px;
    }

    .about-contact {
        padding: 16px;
    }

    .contact-item strong {
        font-size: 12px;
    }

    .resume-symbol {
        width: 125px;
        height: 125px;
        font-size: 54px;
    }

    .experience-item {
        grid-template-columns: 36px 1fr;
        gap: 12px;
        margin-bottom: 34px;
    }

    .experience-item h3 {
        margin-top: 16px;
        font-size: 19px;
    }

    .experience-item p {
        margin-top: 10px;
        font-size: 14px;
    }

    .skill-card {
        min-height: 210px;
        padding-top: 22px;
    }

    .tool-icon {
        margin-bottom: 24px;
    }

    .portfolio-grid {
        gap: 14px !important;
        padding: 16px 0 28px !important;
    }

    .portfolio-grid .portfolio-item {
        flex-basis: 250px !important;
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        height: 310px !important;
        min-height: 310px !important;
        max-height: 310px !important;
    }

    .portfolio-grid .portfolio-overlay {
        padding: 18px !important;
        opacity: 1;
        transform: none;
    }

    .portfolio-grid .portfolio-overlay h3 {
        font-size: 18px;
    }

    .contact {
        padding: 70px 5%;
    }

    .contact-stats {
        margin-top: 32px;
        gap: 16px;
    }

    .contact-stat {
        gap: 14px;
    }

    .contact-stat p {
        font-size: 15px;
    }

    .contact-form form {
        gap: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-form input {
        height: 56px;
    }

    .contact-form input,
    .contact-form textarea {
        border-radius: 16px;
        padding: 18px 15px;
    }

    .contact-form textarea {
        height: 130px;
    }

    .contact-form button {
        height: 54px;
        border-radius: 16px;
    }

    .footer-main {
        padding: 48px 22px 42px;
        gap: 36px;
        text-align: center;
    }

    .footer-logo img {
        width: 132px;
        margin: 0 auto;
    }

    .footer-socials {
        justify-content: center;
        margin-top: 24px;
    }

    .quick-links {
        justify-content: center;
        gap: 20px;
        margin-bottom: 28px;
    }

    .footer-contact a {
        justify-content: center;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .footer-bottom {
        min-height: 0;
        justify-content: center;
        padding: 20px 22px;
        text-align: center;
    }

    .footer-bottom p {
        font-size: 12px;
        line-height: 1.6;
    }

    .whatsapp-float {
        left: 14px;
        bottom: 14px;
        width: 60px;
        height: 60px;
    }

    .whatsapp-float i {
        font-size: 34px;
    }

    .mobile-menu {
        max-width: 100%;
    }

    .mobile-menu-content {
        padding: 82px 28px 36px;
    }

    .mobile-menu-logo {
        width: 180px;
        margin-bottom: 34px;
    }

    .mobile-menu-content h2 {
        margin-bottom: 42px;
        font-size: 21px;
    }

    .mobile-contact h3,
    .mobile-socials h3 {
        margin-bottom: 18px;
        font-size: 18px;
    }

    .mobile-contact a {
        gap: 14px;
        font-size: 15px;
        margin-bottom: 22px;
    }

    .mobile-socials {
        margin-top: 34px;
    }

    .social-icons a {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 350px) {
    .talk {
        font-size: 9px;
        letter-spacing: 0.7px;
    }

    .hero-person {
        height: 370px;
    }

    .hero-person img {
        width: 290px;
        height: 360px;
    }

    .purple-shape {
        width: 255px;
        height: 320px;
        right: calc(50% - 128px);
    }

    .purple-shape.second {
        width: 208px;
        height: 270px;
        right: calc(50% - 100px);
    }
}

/* =========================================================
   SITE MOTION
   Subtle entrance and scroll animations for the full site.
========================================================= */

@media (prefers-reduced-motion: no-preference) {
    @keyframes siteFadeDown {
        from {
            opacity: 0;
            transform: translateY(-18px);
        }

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

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

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

    @keyframes siteFadeLeft {
        from {
            opacity: 0;
            transform: translateX(-28px);
        }

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

    @keyframes siteFadeRight {
        from {
            opacity: 0;
            transform: translateX(28px);
        }

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

    .animations-ready .header {
        animation: siteFadeDown 650ms ease-out both;
    }

    .animations-ready .hero-content {
        animation: siteFadeLeft 800ms 100ms ease-out both;
    }

    .animations-ready .hero-person {
        animation: siteFadeUp 900ms 180ms cubic-bezier(.22, .61, .36, 1) both;
    }

    .animations-ready .stats {
        animation: siteFadeUp 800ms 300ms ease-out both;
    }

    .reveal {
        opacity: 0;
        transform: translateY(28px);
        transition:
            opacity 700ms ease,
            transform 700ms cubic-bezier(.22, .61, .36, 1);
        transition-delay: var(--reveal-delay, 0ms);
        will-change: opacity, transform;
    }

    .reveal.reveal-left {
        transform: translateX(-28px);
    }

    .reveal.reveal-right {
        transform: translateX(28px);
    }

    .reveal.is-visible {
        opacity: 1;
        transform: translate(0);
    }

    .service-card.reveal.is-visible:hover {
        transform: translateY(-8px);
    }

    .skill-card.reveal.is-visible:hover {
        transform: translateY(-7px);
    }

    .portfolio-grid {
        transition: opacity 700ms ease;
    }

    .portfolio-grid.reveal {
        transform: none;
    }
}

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

/* =========================================================
   INTERACTIVE TECH WALL
   A full-screen nano-network that bends and ripples with the cursor.
========================================================= */

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .tech-wall {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        pointer-events: none;
        z-index: 3;
        opacity: 0.95;
    }

    main > section > *,
    .site-footer > .footer-main,
    .site-footer > .footer-bottom {
        position: relative;
        z-index: 4;
    }
}

/* =========================================================
   PORTFOLIO TECH FLIP
   The carousel controls each card's position while this inner layer flips.
========================================================= */

.portfolio-grid .portfolio-item.tech-flip-card {
    perspective: 1400px;
    cursor: pointer;
}

.portfolio-flip-inner {
    position: absolute;
    inset: 0;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 720ms cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.portfolio-grid .portfolio-item.tech-flip-card img {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: none !important;
}

.portfolio-tech-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 24px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(rgba(166, 92, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(166, 92, 255, 0.09) 1px, transparent 1px),
        radial-gradient(circle at 50% 40%, rgba(129, 65, 232, 0.48), transparent 55%),
        #0b0b11;
    background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
}

.portfolio-tech-back::before {
    content: "";
    position: absolute;
    top: -25%;
    right: 12%;
    width: 1px;
    height: 150%;
    opacity: 0.8;
    background: linear-gradient(
        transparent,
        rgba(225, 202, 255, 0.95),
        rgba(129, 65, 232, 0.65),
        transparent
    );
    box-shadow: 44px 0 0 rgba(166, 92, 255, 0.24), -44px 0 0 rgba(166, 92, 255, 0.24);
    animation: techSignal 2.4s linear infinite;
}

.portfolio-tech-back::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(221, 195, 255, 0.3);
    border-radius: 12px;
    pointer-events: none;
}

.portfolio-tech-index,
.portfolio-tech-category,
.portfolio-tech-title,
.portfolio-tech-caption {
    position: relative;
    z-index: 1;
}

.portfolio-tech-index {
    margin-bottom: auto;
    color: #d9bfff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.portfolio-tech-category {
    margin-bottom: 8px;
    color: #caa2ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.portfolio-tech-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.08;
}

.portfolio-tech-caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 1px;
}

.portfolio-grid .portfolio-item.tech-flip-card .portfolio-overlay {
    z-index: 2;
    pointer-events: none;
}

.portfolio-grid .portfolio-item.tech-flip-card.is-flipped .portfolio-flip-inner,
.portfolio-grid .portfolio-item.tech-flip-card:hover .portfolio-flip-inner,
.portfolio-grid .portfolio-item.tech-flip-card:focus-visible .portfolio-flip-inner {
    transform: rotateY(180deg);
}

.portfolio-grid .portfolio-item.tech-flip-card.is-flipped .portfolio-overlay,
.portfolio-grid .portfolio-item.tech-flip-card:hover .portfolio-overlay,
.portfolio-grid .portfolio-item.tech-flip-card:focus-visible .portfolio-overlay {
    opacity: 0 !important;
    transform: translateY(10px) !important;
}

.portfolio-grid .portfolio-item.tech-flip-card:focus-visible {
    outline: 2px solid #d7b9ff;
    outline-offset: 5px;
}

.portfolio-carousel-reverse {
    margin-top: 22px;
}

.portfolio-grid.portfolio-carousel-reverse .portfolio-item {
    flex-basis: 270px !important;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    height: 405px !important;
    min-height: 405px !important;
    max-height: 405px !important;
}

@media (max-width: 900px) {
    .portfolio-grid.portfolio-carousel-reverse .portfolio-item {
        flex-basis: 245px !important;
        width: 245px !important;
        min-width: 245px !important;
        max-width: 245px !important;
        height: 368px !important;
        min-height: 368px !important;
        max-height: 368px !important;
    }
}

@keyframes techSignal {
    from {
        transform: translateY(-18%);
    }

    to {
        transform: translateY(18%);
    }
}

@media (max-width: 600px) {
    .portfolio-carousel-reverse {
        margin-top: 14px;
    }

    .portfolio-grid.portfolio-carousel-reverse .portfolio-item {
        flex-basis: 215px !important;
        width: 215px !important;
        min-width: 215px !important;
        max-width: 215px !important;
        height: 323px !important;
        min-height: 323px !important;
        max-height: 323px !important;
    }

    .portfolio-tech-back {
        padding: 22px 20px;
    }

    .portfolio-tech-title {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-flip-inner {
        transition: none;
    }

    .portfolio-tech-back::before {
        animation: none;
    }
}
