/* ===== VARIABLES & FONTS ===== */
:root {
    --bg-color: #0d0d12;
    /* Deep almost black */
    --second-bg-color: #16161e;
    /* Slightly lighter dark background */
    --text-color: #e2e8f0;
    /* Light grey for readability */
    --main-color: #9d4edd;
    /* Vibrant Mauve */
    --main-color-hover: #7b2cbf;
    /* Darker Mauve for hover */
    --accent-glow: rgba(157, 78, 221, 0.4);
    /* Glow effect color */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    max-width: 100vw;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== HEADER & NAVBAR ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(13, 13, 18, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 5rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: default;
}

.logo-img {
    height: 12rem;
    width: auto;
    object-fit: contain;
}

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

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s;
}

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

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
}

.heading span {
    color: var(--main-color);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--accent-glow);
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    box-shadow: 0 0 2rem var(--accent-glow);
    background: var(--main-color-hover);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 0 2rem var(--accent-glow);
}

.btn-small {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--main-color);
    border-radius: 4rem;
    font-size: 1.4rem;
    color: #fff;
    transition: 0.3s;
    margin-top: 1.5rem;
}

.btn-small:hover {
    background: var(--main-color-hover);
    transform: translateY(-2px);
}

/* ===== HOME SECTION ===== */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15rem;
    position: relative;
    overflow: hidden;
}

/* Subtle background gradient for premium feel */
.home::before {
    content: '';
    position: absolute;
    width: 60rem;
    height: 60rem;
    max-width: 100vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: -1;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 600;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 1rem 0;
    background: linear-gradient(135deg, #fff, #9d4edd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
    max-width: 600px;
    color: #a0aec0;
}

.btn-box {
    display: flex;
    gap: 2rem;
}

.social-icons {
    margin-top: 4rem;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin-right: 1.5rem;
    transition: 0.3s ease;
}

.social-icons a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--accent-glow);
    transform: translateY(-3px);
}

.home-img {
    margin-left: 5rem;
}

.img-placeholder {
    width: 35rem;
    height: 35rem;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--second-bg-color), #20202e);
    box-shadow: 0 0 3rem var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15rem;
    color: var(--main-color);
    border: 5px solid rgba(157, 78, 221, 0.2);
    position: relative;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2rem);
    }

    100% {
        transform: translateY(0);
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--second-bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
}

.about-text h3 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: #a0aec0;
    max-width: 800px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    width: 100%;
}

.skill-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s ease;
}

.skill-card i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.skill-card span {
    font-size: 1.6rem;
    font-weight: 500;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.2);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    align-items: center;
    gap: 2.5rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: var(--second-bg-color);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img-wrapper {
    width: 100%;
    height: 250px;
    background: #1c1c26;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-placeholder {
    font-size: 2.4rem;
    color: #a0aec0;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.portfolio-box img {
    width: 100%;
    transition: .5s ease;
}

.portfolio-layer {
    padding: 3rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portfolio-layer h4 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.portfolio-layer p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #a0aec0;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
    color: var(--second-bg-color);
    font-size: 2rem;
    transition: 0.3s;
}

.portfolio-layer a:hover {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 0 1.5rem var(--accent-glow);
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--second-bg-color);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
}

.services-box {
    background: var(--bg-color);
    padding: 4rem 3rem;
    border-radius: 2rem;
    text-align: center;
    transition: 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Glow efffet inside box */
.services-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.1) 0%, transparent 60%);
    opacity: 0;
    z-index: -1;
    transition: 0.4s ease;
}

.services-box:hover::before {
    opacity: 1;
}

.services-box:hover {
    transform: translateY(-10px);
    border-color: rgba(157, 78, 221, 0.3);
}

.services-box i {
    font-size: 6rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.services-box h3 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
}

.services-box p {
    font-size: 1.5rem;
    color: #a0aec0;
    margin-bottom: 2rem;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-color);
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    margin: 0.7rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    resize: none;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 1rem rgba(157, 78, 221, 0.2);
}

.contact form .input-box input {
    width: 49%;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* ===== FOOTER ===== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 3rem 9%;
    background: var(--second-bg-color);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text p {
    font-size: 1.6rem;
    color: #a0aec0;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .3s;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--accent-glow);
    background: var(--main-color-hover);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: #fff;
}


/* ===== REVIEWS SECTION ===== */
.review-card {
    transition: transform 0.3s ease, border-color 0.3s ease !important;
}

.review-card:hover {
    transform: translateY(-1rem) !important;
    border-color: var(--main-color) !important;
}

/* ===== GUIDE SECTION ===== */
.guide-card:hover {
    transform: translateY(-1rem) !important;
    border-color: var(--main-color) !important;
    box-shadow: 0 0 2rem rgba(157, 78, 221, 0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .services {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--second-bg-color);
        border-top: .1rem solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        text-align: center;
    }

    .home {
        flex-direction: column;
    }

    .home-img {
        margin-left: 0;
        margin-top: 5rem;
    }

    .img-placeholder {
        width: 30rem;
        height: 30rem;
        font-size: 14rem;
    }

    .about-content {
        flex-direction: column-reverse;
    }

    .home::before {
        width: 100vw;
        height: 100vw;
        max-width: 100%;
    }
}

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

    .contact form .input-box input {
        width: 100%;
    }

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

    .btn-box {
        flex-direction: column;
        gap: 1.5rem;
    }

    .btn-box .btn {
        text-align: center;
        width: 100%;
    }

    .img-placeholder {
        width: 25rem;
        height: 25rem;
        font-size: 12rem;
    }
}

/* ===== ANIMATIONS UTILITIES ===== */
.animate-element {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.slide-up {
    transform: translateY(50px);
}

.slide-down {
    transform: translateY(-50px);
}

.slide-left {
    transform: translateX(-50px);
}

.slide-right {
    transform: translateX(50px);
}

.scale-in {
    transform: scale(0.9);
}

.fade-in {
    opacity: 0;
}

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

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

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Active animation state applied by JS */
.animate-element.show {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ===== EXPERIENCE RINGS ANIMATION ===== */
.animate-element.show .ring-progress-total {
    stroke-dashoffset: var(--target-offset) !important;
}

/* ===== MEMORY GAME CSS ===== */
.minigame {
    padding-bottom: 5rem;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1.5rem;
    perspective: 1000px;
}

.memory-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.memory-card:active {
    transform: scale(0.97);
    transition: transform 0.2s;
}

.memory-card.flip {
    transform: rotateY(180deg);
}

.front-face, .back-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    backface-visibility: hidden;
    box-shadow: 0 0 1.5rem rgba(0,0,0,0.2);
    border: 2px solid rgba(157, 78, 221, 0.2);
}

.front-face {
    transform: rotateY(180deg);
    background: rgba(157, 78, 221, 0.1);
    color: var(--main-color);
    border-color: var(--main-color);
}

.back-face {
    color: rgba(255,255,255,0.2);
}

.memory-card.matched .front-face {
    background: rgba(16, 185, 129, 0.15); /* Greenish */
    border-color: #10b981;
    color: #10b981;
}

@media (max-width: 600px) {
    .memory-board {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 1rem;
    }
    .front-face, .back-face {
        font-size: 2.5rem;
        border-radius: 1rem;
    }
}

/* ===== RUNNER GAME CSS ===== */
.runner-game-area {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 220px;
    margin: 0 auto;
    background: var(--bg-color);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 2.5rem rgba(0,0,0,0.2) inset;
    outline: none; /* remove focus outline since we click it */
}

.runner-ground {
    position: absolute;
    bottom: 30px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
}

.runner-dog {
    position: absolute;
    bottom: 32px;
    left: 10%;
    font-size: 4rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    z-index: 2;
    transform: scaleX(-1);
}

.runner-obstacle {
    position: absolute;
    bottom: 32px;
    right: -50px;
    font-size: 3.5rem;
    width: 35px;
    height: 35px;
    line-height: 35px;
    z-index: 2;
}

.runner-dog.jump {
    animation: dogJump 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes dogJump {
    0% { bottom: 32px; }
    40% { bottom: 140px; }
    50% { bottom: 145px; }
    60% { bottom: 140px; }
    100% { bottom: 32px; }
}

.runner-obstacle.move {
    animation: obstacleMove 1.5s linear infinite;
}

@keyframes obstacleMove {
    0% { right: -50px; }
    100% { right: 100%; }
}

/* ===== LOGO ANIMATION IN ABOUT SECTION ===== */
.animated-logo {
    filter: drop-shadow(0 0 1rem var(--accent-glow));
    animation: floatLogo 4s ease-in-out infinite, pulseGlow 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes floatLogo {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 1rem var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 3rem rgba(157, 78, 221, 0.8)); }
    100% { filter: drop-shadow(0 0 1rem var(--accent-glow)); }
}

@media (max-width: 768px) {
    .total-experience {
        margin-top: 3rem !important;
        width: 20rem !important;
        height: 20rem !important;
    }
}