:root {
    --color-bg: #0f172a;
    --color-navy: #1e293b;
    --color-purple: #a855f7;
    --color-purple-glow: rgba(168, 85, 247, 0.5);
    --color-blue: #38bdf8;
    --color-light: #e2e8f0;
    --color-white: #f8fafc;
    --color-gray: #94a3b8;
    --color-dark: #020617;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 16px;

    --color-accent: #2dd4bf;
    --color-badge: rgba(45, 212, 191, 0.1);
    --color-badge-text: #2dd4bf;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', 'Roboto Mono', monospace, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    color: var(--color-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.main {
    width: 100%;
    margin: 0 auto;
    margin-top: 70px;
    padding: 2rem 1rem;
}

.glass-nav {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    padding: 1rem 0;
}

@media screen and (max-width: 768px) {
    .main {
        margin-top: 56px;
        padding: 1rem;
    }

    .hero__title {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .hero__desc {
        font-size: 1.05rem;
        padding: 0 1rem;
    }

    .btn-cv {
        display: block;
        margin: 1rem auto;
        width: 85%;
        max-width: 280px;
        text-align: center;
        padding: 0.8rem 1.5rem;
    }

    .contact__form {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        padding: 1.5rem;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    [data-aos] {
        will-change: opacity, transform;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero__title,
    .hero__subtitle,
    .hero__desc,
    .section__title {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    background: transparent;
    position: relative;
    padding-top: 2rem;
}

.hero__profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 50%;
    margin-bottom: 2rem;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.3);
    transform: scale(1.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero__profile-img:hover {
    transform: scale(1.5);
    box-shadow: 0 0 40px rgba(14, 255, 223, 0.3);
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    margin-top: 0;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero__subtitle {
    font-size: 1.4rem;
    color: var(--color-blue);
    margin-bottom: 0.8rem;
    font-family: 'Roboto Mono', monospace;
}

.hero__desc {
    font-size: 1.2rem;
    color: var(--color-gray);
    margin-bottom: 2rem;
    padding: 0 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section {
    margin-top: 8rem;
}

.section__title {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1.2rem;
    margin-right: 1rem;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.3rem;
    background: none;
    box-shadow: none;
}

.section__description {
    font-size: 1.1rem;
    color: var(--color-gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}

.section--about .section__description {
    background: var(--color-card);
    border-radius: 10px;
    padding: 1.5rem;
    color: var(--color-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stack__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 90px;
    min-height: 110px;
    font-size: 2.5rem;
    color: var(--color-light);
    transition: var(--transition-smooth);
}

.stack__item img {
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: 0.5rem;
    filter: grayscale(0.2);
}

.stack__item span {
    font-size: 1rem;
    color: var(--color-light);
    margin-top: 0.5rem;
    font-family: 'Roboto Mono', monospace;
    text-align: center;
}

.stack__item:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    height: 100%;
    margin-bottom: 1.5rem;
    /* Space between stacked cards on mobile */
}

@media (min-width: 992px) {
    .card {
        margin-bottom: 0;
    }
}

.card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.6);
}

.card__title {
    font-size: 1.3rem;
    color: var(--color-purple);
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.card__meta {
    margin-bottom: 1rem;
}

.card__repo {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    transition: color 0.2s;
    gap: 0.5rem;
}

.card__repo:last-child {
    margin-right: 0;
}

.project__title {
    font-size: 1.3rem;
    color: var(--color-blue);
    font-weight: bolder;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.project__description {
    color: var(--color-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.project__meta {
    margin-bottom: 1rem;
}

.project__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.card:hover .project__image {
    transform: scale(1.02);
}

/* .project__image--portrait {
    height: 450px !important;
    Taller for vertical screenshots
    object-position: top center;
} */

/* Mobile Mockup Style for Invitations */
.mobile-mockup-wrapper {
    height: 350px;
    width: 100%;
    background: linear-gradient(135deg, var(--color-navy) 0%, #2a2d3e 100%);
    /* Subtle dark gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    padding: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

/* Optional: Add a subtle glow or pattern behind */
.mobile-mockup-wrapper::before {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    background: var(--color-purple-glow);
    filter: blur(40px);
    opacity: 0.2;
    border-radius: 50%;
}

.mobile-mockup-img {
    height: 100%;
    width: auto;
    max-width: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: transform 0.3s ease;
}

.card:hover .mobile-mockup-img {
    transform: scale(1.03) translateY(-5px);
}

.tech-badge {
    display: inline-block;
    background: var(--color-badge);
    color: var(--color-badge-text);
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    padding: 0.2rem 0.7rem;
    font-size: 0.9rem;
    /* margin-right: 0.5rem;  Removed in favor of flex gap */
    /* margin-bottom: 0.3rem; Removed in favor of flex gap */
    font-family: 'Roboto Mono', monospace;
}

.project__repo {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    transition: color 0.2s;
    gap: 0.5rem;
}

.project__repo:last-child {
    margin-right: 0;
}

.project__video {
    margin-top: 1.2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    background: #181a20;
}

.section--contact .contact__icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stack__icon--csharp {
    width: 2.2rem;
    height: 2.2rem;
    display: block;
    margin: 0 auto 0.5rem auto;
    font-size: 2.2rem;
    color: var(--color-white);
    filter: grayscale(0.2);
    text-align: center;
    background: none;
    border: none;
    box-shadow: none;
    font-family: inherit;
    font-weight: normal;
}

.contact__icon {
    color: var(--color-accent);
    font-size: 2rem;
    transition: color 0.2s, transform 0.2s;
}

.contact__icon:hover {
    transform: scale(1.15);
}

.about__list {
    list-style: disc inside;
    color: var(--color-light);
    font-size: 1.05rem;
    margin: 0 auto 1rem auto;
    max-width: 600px;
    padding-left: 1.2rem;
    text-align: left;
}

.about__list--skills {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.btn-cv {
    display: inline-block;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-emerald) 100%);
    /* Fresh gradient */
    color: #ffffff;
    /* Dark text for contrast */
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    text-decoration: none;
    margin: 2rem 1rem;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
    transition: var(--transition-smooth);
    border: none;
}

.btn-cv:hover {
    background: rgba(45, 212, 191, 0.3);
    color: var(--color-dark);
}

.section--certificates {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: block;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 8rem;
    /* Consistent spacing */
}

.section--certificates .container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    /* Responsive padding: use Bootstrap standard container behavior or slight adjust for desktop */
}

@media (min-width: 992px) {
    .section--certificates .container {
        padding: 0 6rem;
    }
}

.certificates__list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: 95%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Certificates now use bootstrap grid, reusing styles but in a new class or updated selector */
.certificate-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    font-size: 1.05rem;
    border-left: 3px solid var(--color-accent);
    /* Thinner elegant accent */
    width: 100%;
    height: 100%;
}

.certificate-item:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 18px rgba(162, 89, 247, 0.13);
    background: rgba(30, 41, 59, 0.6);
    /* Slightly darker on hover */
}

.certificate-item a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    width: 100%;
}

.certificate-item a:hover {
    color: var(--color-blue);
}

.certificate-item i {
    color: #e74c3c;
    font-size: 1.3rem;
}

.section--testimonials {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem 0 2.5rem 0;
    margin-bottom: 2.5rem;
}

.testimonials__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.testimonial {
    background: var(--color-card);
    border-left: 4px solid var(--color-accent);
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    max-width: 600px;
    color: var(--color-light);
    font-style: italic;
    box-shadow: 0 2px 8px rgba(122, 40, 202, 0.10);
    margin: 0 auto;
}

.testimonial footer {
    margin-top: 0.7rem;
    color: var(--color-accent);
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    text-align: right;
}

.contact__form {
    margin: 2rem auto 0 auto;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.contact__form input,
.contact__form textarea {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: var(--color-bg);
    resize: none;
    color: var(--color-light);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact__form input:hover,
.contact__form textarea:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact__form input:focus,
.contact__form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
    color: var(--color-white);
    opacity: 0.7;
    /* Optional: for better readability */
}

.btn-form {
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-form:hover {
    background: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.btn-form:active {
    transform: translateY(0);
}

.nav__link,
.btn-cv,
.btn-form,
.project__repo,
.card,
.stack__item,
.contact__icon {
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.nav__link:hover,
.nav__link:focus,
.btn-cv:hover,
.btn-form:hover,
.project__repo:hover,
.stack__item:hover,
.contact__icon:hover {
    transform: translateY(-2px) scale(1.04);
}

[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(.4, 0, .2, 1), transform 0.7s cubic-bezier(.4, 0, .2, 1);
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

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

    [data-animate] {
        transition: none !important;
    }
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes pop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-fadein {
    animation: fadein 1.2s ease;
}

.animate-up {
    animation: up 1.1s cubic-bezier(.4, 0, .2, 1);
}

.animate-pop {
    animation: pop 0.7s cubic-bezier(.4, 0, .2, 1);
}

[data-scroll] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

[data-scroll="in"] {
    opacity: 1;
    transform: translateY(0);
}

::-webkit-scrollbar {
    width: 8px;
    background: var(--color-navy);
}

::-webkit-scrollbar-thumb {
    background: var(--color-blue);
    border-radius: 4px;
}

[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}